- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 07:20 AM
I have created a 'Yes/No' type variable. I would like to set the value to 'Yes' at a particular stage in the workflow using a 'Run Script'.
I have tried current.variable_name = 'Yes' which does not work. Any suggestions?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 07:34 AM
sorry...there was a mistake
current.variables.variable_name ='yes' ; // when its not part of variable set
current.variable_pool.variable_name = 'yes'; //when part of variable set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2015 07:49 AM
Norton,
Take a look at wiki post http://wiki.servicenow.com/index.php?title=Scriptable_Service_Catalog_Variables
You will need to do the following:
current.variables.<variable name> = <value>
or
current.variables.<variable name>.setValue('Yes');