How to call catalog item variable?

ak4
Tera Contributor

How to call catalog item variable?

7 REPLIES 7

asifnoor
Kilo Patron

Hi

catalog item variables can be accessed in server script using

current.variables.variable_name;

Kindly mark the comment as a correct answer and also helpful if this answers your question.

BryanS413339635
Tera Guru

Could you explain the question a bit more? Not sure what you are asking.

reshmapatil
Tera Guru

Hi,

 

If you want variable to be used in Catalog Client Script you can use same as we use fields

For example : g_form.setValue('pass variable name here', 'pass value here')

 

For more information you can refer:

https://docs.servicenow.com/bundle/jakarta-application-development/page/script/client-scripts/concep...

 

And to use variables in other service side scripts

current.variables.variable_name.

 

Please let me know if you need anything more on this.

Thanks.

SaeS
Tera Contributor

it's perfect