Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to pass variables from an item to a catalog task using scripts in Flow designer

Nicole_k
Kilo Expert

I am new to flow designer and I am struggling to get the right format to pass the variables from a form to a catalog task. I have used the get variables action.

Basically i want to include the first_name and last_name variables in the short description of the task,

I used to do this in Workflows but the script seems to need a variation and I cannot find the right format.

 

find_real_file.png

1 ACCEPTED SOLUTION

I mean to say do like below. Type what you want in short description then drag variables from right side.

find_real_file.png

View solution in original post

6 REPLIES 6

Mike Patel
Tera Sage

did you tried

var shortDesc = "Review new vendor account - " + fd_data.trigger.current.variables.first_name + " " + fd_data.trigger.current.variables.last_name;
return shortDesc;

Hi Mike, I did and I get this when i run a test
find_real_file.png

can you just drag and drop from right side and see what you get?

I tried that too. Does not allow me to drag into the script box