Re: nested vars - possible to use? (263 Views)
Reply
Regular Advisor
AlexGg
Posts: 86
Registered: ‎08-10-2006
Message 1 of 8 (326 Views)

nested vars - possible to use?

Is it possible to use something like ${${varName}}, where ${varName} has e.g. ciName value, which also is variable, which contains e.g. domainName, and so on ?

 

if

${varName}=ales

${ales}=nick

${nick}=1941

after reading of something like ${${${varName}}}

I will get '1941'

 

 

Trusted Contributor
ntt00015
Posts: 91
Registered: ‎09-18-2011
Message 2 of 8 (320 Views)

Re: nested vars - possible to use?

Hi Alex,

 

As I understand you are trying to use variables as Jarrays with pointers. Best of my knowledge, you cannot use this in OO like you tried. But it might be useful to try to use JSON format to achieve that result. Just search for JSON arrays and JSON pointer. It might help you.

 

 

Regards.

Regular Advisor
AlexGg
Posts: 86
Registered: ‎08-10-2006
Message 3 of 8 (302 Views)

Re: nested vars - possible to use?

Thanks, do you mean in general search or in oo?
Trusted Contributor
ntt00015
Posts: 91
Registered: ‎09-18-2011
Message 4 of 8 (296 Views)

Re: nested vars - possible to use?

I mean general, google it! :)

Regular Advisor
AlexGg
Posts: 86
Registered: ‎08-10-2006
Message 5 of 8 (277 Views)

Re: nested vars - possible to use?

Another scenario I faced: I read the file with proper System Property name, e.g. ${eMailToSend} which has in OO content e.g. ala@blah.net. When I read this in variable I se it has ${eMailToSend}, but I am not able to get its value: ala@blah.net to use... I stuck.. and perhaps need some fresh air... anybody?
Trusted Contributor
ntt00015
Posts: 91
Registered: ‎09-18-2011
Message 6 of 8 (273 Views)

Re: nested vars - possible to use?

[ Edited ]

Hi,

 

Maybe you can try to user "Set Flow Variable" Operation under the "Utility Operations/Flow Variable Manipulation". With this operation you can use variables like a pointer. While getting the values you can use "Flow Variable Resolver" operation in the reverse sequence.

Regular Advisor
AlexGg
Posts: 86
Registered: ‎08-10-2006
Message 7 of 8 (268 Views)

Re: nested vars - possible to use?

Thank you. Still not sure what to do with that, but will check it out. Meanwhile I got a question: if operation has its scriptlet, and I use that operation in my flow and will apply my scriptlet in that operation, what will be the order to execute that scriptlets?
Trusted Contributor
ntt00015
Posts: 91
Registered: ‎09-18-2011
Message 8 of 8 (263 Views)

Re: nested vars - possible to use?

Hi Alex,

 

You did not mean scriptlet tab; you meant scriptlet filter in outputs, right?

If an operation has a (pre-response) scriptlet, you can not add an another scriptlet, you can just edit the existing scriptlet and add your own code in the (pre-response) scriptlet tab.

But in the outputs the you can add scriptlet filters as many as you needed(You can sort the execution order)

As my experiences, in general rule, the result filters executes first. And the operations pre-response scriptlet executes at last.

But in some cases, it changes how to code your pre-response scriptlet. If you use "scriptletInput" parameter as an input in the script, it gives you raw result, not the filtered results. So be aware while using "scriptletInput" parameter in the pre-response scriptlet.

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.