Re: Result and returnResult fields (245 Views)
Reply
Advisor
dsalkin
Posts: 30
Registered: ‎06-07-2012
Message 1 of 2 (254 Views)
Accepted Solution

Result and returnResult fields

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

Trusted Contributor
Steve_Drummond
Posts: 89
Registered: ‎10-01-2012
Message 2 of 2 (245 Views)

Re: Result and returnResult fields

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 HP. By using this site, you accept the Terms of Use and Rules of Participation.