Trusted Contributor.. sunts Trusted Contributor..
Trusted Contributor..
448 views

Step Context Variables

Is it possible to get a list of all variables available within the Step Context?

I have a requirement where I need to retrieve the list and loop through them, pulling the values if they match a certain critera.

Thanks
Sunts

0 Likes
5 Replies
Trusted Contributor.. sunts Trusted Contributor..
Trusted Contributor..

Re: Step Context Variables

Found what I needed myself via scriptletContext.keySet();

0 Likes
Respected Contributor.. thisamu Respected Contributor..
Respected Contributor..

Re: Step Context Variables

Hello Sunts,

Can you explain me how you use scriptletContext.keySet() ?

I've tried this code in a step's scriplet on OO 10.51 and an error occured : "Cannot find function keySet in object ...."

Thank you in advance

Trusted Contributor.. sunts Trusted Contributor..
Trusted Contributor..

Re: Step Context Variables

I'm simply setting the scriptletResult to the output of the keySet:
scriptletResult = scriptletContext.keySet();

We are running HP OO v10.70 so not sure if the keySet() method is available in 10.50 or not. I can't find any documentation around the method either so using it might be pretty risky anyway.

Can anyone from Micro Focus comment on this method please?

 

Respected Contributor.. thisamu Respected Contributor..
Respected Contributor..

Re: Step Context Variables

Thank you. it works on 10.80 too.

+ 1 : This feature could be very helpful and should be documented.

Trusted Contributor.. sunts Trusted Contributor..
Trusted Contributor..

Re: Step Context Variables

Good to hear it is working for you.

Can anyone from Micro Focus please comment on this method?

0 Likes
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.