How to retrieve form variable value via script in flow designer

Shivam32
Tera Contributor

I have a requirement to set the dropdown field value on the case based on the variable value select on the form via flow designer
Variable on the form is of multiplechoice type:


eg: if user selects 1st option from the form the  field value on the case will be set as allowed. Office type field is a choice type field. If the user selects 2nd option then office type field value will be set as review pending.

 

1 ACCEPTED SOLUTION

@Shivam32 

you can use inline f(x) script and use if else and determine the value

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

10 REPLIES 10

Pooja58
Kilo Sage

Hi @Shivam32 ,

 

"Try using the fd_data object and use the dot notation (fd_data.). This will display multiple options to choose from. If you have already retrieved variables using the 'Get Catalog Variables' action, you can use them as shown below to fetch a particular variable value.

In this example, I am sending the obj to the event parameter parm2, where the remarks are being fetched from the 'Get Catalog Variables' action used in step 2. When you type fd_data., you will see multiple options to select from."



Pooja58_0-1739869024910.png


Kindly mark as correct/helpful if solves your issue.

Best Regards,

Pooja