What is a variable_pool and how is it used?

Mira3
Kilo Contributor

Hello, 

what is a variable_pool and how is it used in workflow activities? 

 

Thanks for the help!

1 ACCEPTED SOLUTION

Nitin_NOW
Tera Guru

it is an object where you can access the field values of RITM and can be used in workflow activities (Advanced Script)

for example if there is a field on the RITM page - 'Please select size of Hard disk' and the value entered/selected is '250GB'.

If you wanted to access this field value in the workflow script, below is the way you get it via variable_pool

current.variable_pool.size_harddisk //size_harddisk is the variable name of 'Please select size of Hard disk'.

Please hit correct based on response.

Thanks

View solution in original post

6 REPLIES 6

Nitin_NOW
Tera Guru

it is an object where you can access the field values of RITM and can be used in workflow activities (Advanced Script)

for example if there is a field on the RITM page - 'Please select size of Hard disk' and the value entered/selected is '250GB'.

If you wanted to access this field value in the workflow script, below is the way you get it via variable_pool

current.variable_pool.size_harddisk //size_harddisk is the variable name of 'Please select size of Hard disk'.

Please hit correct based on response.

Thanks

Good 

guruprasad1
Kilo Guru

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Mira,

variable_pool is used to retrieve variable values in workflow activities; usage

current.variable_pool.<variableName>

you can also use

current.variables.<variableName>

you can use this in any server side script with condition that current is object of sc_req_item table.

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader