Highlighted
Respected Contributor.
Respected Contributor.
674 views

How to print local variable

Jump to solution

Hi Experts,

I have set value to a local variable ( $CDAXNotification ) under calculate tab of FC. Below screenshot shows the same.

localvariable.PNG

To just want to see the value of this variable at run time.  For that i have tried bellow prints statements. But its not displaying the correct value.

javaScriipttab.PNG

 

Could you please suggest a way to see the value of local variable at run time.

Thanks in advance

Jithisha

0 Likes
1 Solution

Accepted Solutions
Highlighted
Knowledge Partner
Knowledge Partner

Re: How to print local variable

Jump to solution
when you set this variables they are available during the session... so on the line before, add the value to false to 'reset' the variable..
update: true
calculation: variable = false.
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!

View solution in original post

6 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: How to print local variable

Jump to solution
print(vars.$variablename)
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: How to print local variable

Jump to solution

Hi Breno,

Thanks for the reply now am able to print local variable.

I need to set the value of variable to true or false based on value in assignment.check1 field.

If value in 'assignment.check1 ' field is not NULL then i need to set $CDAXNotification to true.

for this in calculate tab of FC i wrote below conditions

1. assignment.check1 in $file~="NULL" 

2. not (null(assignment.check1 in $file))

Screen shot shows the same.

Capture.PNG

when I am importing a txt file,the data will pass through the above FC. And based on the value in the 'Assignment Group Check' column in txt file, the local variable should get set to true.

The issue what am facing here is the, Some values in 'Assignment Group Check' column contains NULL value. And for those NULL value local variable should not get set to True. But it is getting set to true.

Column name in txt file is 'Assignment Group Check' and field name in db for this is 'assignment.check1'.

Attached the import txt file.

Could you please suggest a way to resolve this issue.

Regards,

Jithisha

 

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: How to print local variable

Jump to solution
when you set this variables they are available during the session... so on the line before, add the value to false to 'reset' the variable..
update: true
calculation: variable = false.
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!

View solution in original post

Highlighted
Respected Contributor.
Respected Contributor.

Re: How to print local variable

Jump to solution

I tested by adding below condition. But still for everything local variable is getting set to true.

update: true
calculation: $CDAXNotification=false

Capture2.PNG

Could you please suggest a solution.

Thanks & Regards,

Jithisha

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How to print local variable

Jump to solution

In your screenshot of the formatcontrol calculations I see that you've added your condition for the column "update". 

The columns in Formatcontrol calculations are:

add / update / delete / display / initial / calculation

If you're importing that "Import_file.txt" file and you want to "update" the probsummary records, that should work.

If you want to "add" the probsummary records with the import of the file, you need to add the condition to the first column (the one for "add"). 

Thank you for using the MicroFocus ServiceManager Support and News Forum. If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How to print local variable

Jump to solution

I've created a small test - import - scenario. 

Please have a look at it. I used table "class" which is pretty small and empty in SM9.62 OOB system to import 3 records. You can load that "unl" files to a test system and play around that. 

Or simply look at the screenshots and compare them with your settings how it works. 

 

Thank you for using the MicroFocus ServiceManager Support and News Forum. If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.