Reference variables that are inside of a variable set in a workflow

dbrennan
Kilo Contributor

Hey everyone,

I have a variables set that I created that contains multiple variables such as name, email, role, etc.

This is for a catalog item that on-boards new users to an app we use for project development.   This catalog item runs a WF that calls an api to add new users to the app.   The issue I am running into is that I cannot reference the variables I need inside of the variable set using the normal current.variables.name_of_variable.

Is there a special way you have to follow in order to properly reference variables that are contained inside of a variable set?

Due to specific policies my org has set in place for developing on their ServiceNow instance, I cannot put in bulk requests items on a single request any other way that through the use of a variable set which is why I have to figure out a way to do it this way.

Any help would be much appreciated!

Thanks,

Devlin

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

Hi Devlin,



Did you try current.variable_pool.variable_name? Usually current.variables works for variable set. But you can also access a variable set value using variable_pool.



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

8 REPLIES 8

you are right Sanjiv you can reference variable sets via current.variables.name_of_variable. I actually misunderstood myself what I was trying to reference so I am moving this to a new thread here.


Hi Sanjiv, 

Happy New Year! your solution works!

Thanks,

Priyanka R

 

 

The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here:
Variable Types


Scriptable Service Catalog Variables



Visit http://docs.servicenow.com for the latest product documentation