The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does anyone know how to access the order guide variables from the order guide script field?

johnnysharp
Tera Contributor

I would like to be able to access an order guide variable to use for a loop in the order guide script field. Does anyone know of a way to access the order guide variables within the order guide script field?

I have tried:

current.vars.<variable_name>

current.variables.<variable_name>

current.variable_pool.<variable_name>

guide.vars.<variable_name>

guide.variables.<variable_name>

guide.variable_pool.<variable_name>

11 REPLIES 11

Balaji,



Thank you for your response, however, I have already reviewed these pages. Neither of them talk about accessing the order guide variables from within the "Script" field on the order guide record.



I am already aware of the guide.add and guide.remove functions. I actually want to use the guide.add function in the script, but need to get the value of an order guide variable in the script as well.



Best regards


Hi Johnny,



You could use a Catalog Client Script to get access to the variables.



https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/script/client-scripts/reference...



Best regards,



Joni


Joni,



Thank you, however I am looking to access the variables in the order guide records "Script" field. I want to use some variables in logic surrounding the use of the guide.add function. From my understanding, I would not be able to use the guide.add function in the client script. If that is a misunderstanding on my part then that would be great.



Thanks again,



Johnny