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 script in Flow Designer

ceraulo
Mega Guru

Hello!
I've recently started using the Flow Designer to create workflow for our Catalog Items.
In the traditional workflow, customizing the Short Description is shown below.

task.short_description = current.variables.variable1 + " - " + current.requested_for; 

In Flow Designer, I tried the below but it does not work.

var shortDesc = fd_data.trigger.request_item.variables.variable1 + ' - ' + fd_data.trigger.request_item.requested_for;
return shortDesc;

Please help!

Thank you.

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi @ceraulo 

it is not necessary to script something.

You just can do this by pulling the respective data pills into the Short Description in an "Update Record" action.

find_real_file.png

Kind regards
Maik

View solution in original post

5 REPLIES 5

Marked this helpful. (I wish it was easier to find direct how-to-script-stuff-in-flow answers like this.) I needed to know this trick, but for a different application, where using the 'Get Catalog Variables' pill picker was not an option. Thankee sai.