Absent Member.. dsalkin Absent Member..
Absent Member..
1193 views

Result and returnResult fields

Jump to solution

Hi,

Having problems with an operation's Result and returnResult fields...

1. A SQL Query All Rows operation returns a string, say, "694".
2. In the pre-response scriptlet I read this value using scriptletRawResult['returnResult']). This works fine.
3. In the same scriptlet I then return a Result (using scriptletResult) based on the value of the raw result. (In my case, if the rawResult is "694" I return the string "single", else I return "multi").
4. In the debugger I see that this has all worked very well!

Result=single;returnResult=694;returnCode=0;

However, in the Results tab of the same operation I have then assigned a flow variable from Result Field: Result. I expected the flow variable to be assigned with the value "single" but it ends up being assigned "694" - exactly as if I had assigned the flow variable from Result Field: returnResult.

Can anyone explain this? Is it a defect?

Thanks,

David Salkin
HP SaaS

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Absent Member.. Steve_Drummond Absent Member..
Absent Member..

Re: Result and returnResult fields

Jump to solution

Hi David,

 

This is functioning as expected. You cannot overwrite the value of a 'Result Field', much as you cannot overwrite a 'Flow Output'.

 

An iAction returns a bunch of results into predefined result fields (in this case one called "Result"). You can then assign any number of new outputs from this result field but you cannot change the field itself as they are a static object returned to OO via the RAS service.

 

The scriptletResult you are assigning is just the result value for that step, not the result field called "Result".

 

If you need this output to say "single" or "multi" you can use a scriptlet filter on that Output instead of in the pre-response scriptlet.

 

Hope this helps,

steve

1 Reply
Absent Member.. Steve_Drummond Absent Member..
Absent Member..

Re: Result and returnResult fields

Jump to solution

Hi David,

 

This is functioning as expected. You cannot overwrite the value of a 'Result Field', much as you cannot overwrite a 'Flow Output'.

 

An iAction returns a bunch of results into predefined result fields (in this case one called "Result"). You can then assign any number of new outputs from this result field but you cannot change the field itself as they are a static object returned to OO via the RAS service.

 

The scriptletResult you are assigning is just the result value for that step, not the result field called "Result".

 

If you need this output to say "single" or "multi" you can use a scriptlet filter on that Output instead of in the pre-response scriptlet.

 

Hope this helps,

steve

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.