Flow Designer - How can I access output variable from Script Step in f(x) script in a activity?

John_123_Snow
Mega Expert

Since ServiceNow lacks their documentation...I will have to ask here,

How can I access output variable in a Flow Designer in f(x) function of an Activity?

find_real_file.png

1 ACCEPTED SOLUTION

@John.123.Snow 

Refer sample example below

1) My step 2 is custom action and it has output variable

2) how it can be used to fetch the output variable refer below

fd_data._2__list_collector_convert_to_array.variable

find_real_file.png

Regards
Ankur

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

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Did you try to dot walk in the script from the 2nd step

Regards
Ankur

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

can you collaborate more please? I don't understand, I am trying to get access to that variable in the approval step so id I do fd_data.trigger.[variable name] in my case "fd_data.trigger.approvalGroups" then I will have access to it? 

Hi,

You need to fetch output from the 2nd step

try to type fd_data. and then check whether it shows 2nd step

Regards
Ankur

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

@John.123.Snow 

Refer sample example below

1) My step 2 is custom action and it has output variable

2) how it can be used to fetch the output variable refer below

fd_data._2__list_collector_convert_to_array.variable

find_real_file.png

Regards
Ankur

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