Unable to see script toggle in flow designer

NavyaVenkat_Y
Tera Expert

Im unable to see script toggle while creating a workflow, im currently using australia PDI version.

If there is any configuration required, where can i do that ?

Im attaching the snips for reference.

My End goal - I want to write a script that converts short description into lowercase and provides output as a string.

#flowdesigner #flows #scripting

3 ACCEPTED SOLUTIONS

yashkamde
Giga Sage

Hello @NavyaVenkat_Y ,

 

Flow Logic elements - If, For Each, Else IF are declarative only. They don’t have the Toggle Script option.

You can configure them using data pills...

 

what you can do is Set Flow Variable step with Toggle Script enabled:

var desc = fd_data.trigger.current.short_description;
return desc ? desc.toLowerCase() : '';

Then use that variable in your If condition or pass it into an action.

 

If my response helped mark as helpful and accept the solution.

View solution in original post

Nishant8
Tera Sage

Hello @NavyaVenkat_Y ,  To achieve your goal, please follow the below instructions:

- Create a Flow Variable (select String) by clicking on the 3 dots on the top of Flow:

Nishant8_0-1784363328625.png

 

- Next, click on the 'Flow Logic' and select 'Set Flow Variables' available at the bottom

- Now, select the created Flow variable and in the value section use the script as highlighted.

Nishant8_1-1784363536867.png

Although, instructions to use the scripting are available in the script section, please revert for any assistance.

 

Regards,

Nishant

 

 

View solution in original post

NavyaVenkat_Y
Tera Expert

Just a quick update i found that Utility Actions Spoke is not available for PDI's hence the script action is not available.

NavyaVenkat_Y_0-1784523665969.png

 

View solution in original post

14 REPLIES 14

Glad that helped you! @NavyaVenkat_Y ,

 

Just a quick note, you can mark multiple responses as solution. That way others searching later can benefit the approaches too.

Nishant8
Tera Sage

Hello @NavyaVenkat_Y ,  To achieve your goal, please follow the below instructions:

- Create a Flow Variable (select String) by clicking on the 3 dots on the top of Flow:

Nishant8_0-1784363328625.png

 

- Next, click on the 'Flow Logic' and select 'Set Flow Variables' available at the bottom

- Now, select the created Flow variable and in the value section use the script as highlighted.

Nishant8_1-1784363536867.png

Although, instructions to use the scripting are available in the script section, please revert for any assistance.

 

Regards,

Nishant

 

 

Hello @Nishant8 

Thank you for the step by step procedure, This helped me a lot & everything is working well.

masonreed11
Giga Contributor

The Script toggle should usually be available on a PDI. I'd first check that the necessary Flow Designer plugins are enabled and that your user has the required roles. If you're still not seeing it, share your ServiceNow release and screenshots so the community can help identify what's missing.

NavyaVenkat_Y
Tera Expert

Just a quick update i found that Utility Actions Spoke is not available for PDI's hence the script action is not available.

NavyaVenkat_Y_0-1784523665969.png