The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Script in flow designer if condition

nirwan_ritik
Tera Contributor

Hi community,

The variable I have selected in the below condition is select box whose choices are coming from a catalog client script on the form -> hence not showing in the select box in the flow. This could have been easily handles in workflow using script. But how to do it in Flow Designer!

nirwan_ritik_0-1753421409340.png
Kindly assist me on this 🙂

Regards

 

9 REPLIES 9

@nirwan_ritik 

Thank you for marking my response as helpful.

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

@nirwan_ritik 

Hope you are doing good.

Did my reply answer your question?

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

Ankur Bawiskar
Tera Patron
Tera Patron

@nirwan_ritik 

There is some issue going on in community that images are not visible.

please add it using browse feature and add as attachment to post

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

I replied Mark with the image. Not able to add here!

Aniket Chavan
Tera Sage
Tera Sage

Hello @nirwan_ritik ,


Just a quick question before suggesting something — could you let me know approximately how many total choices you have for that select box variable across all conditions (regardless of how they’re shown/hidden using the client script)?

 

The reason I’m asking is — if the total number isn’t too large (say around 5–10), then one possible workaround is to add all those choices statically under the select box variable first. Once that’s done, you can continue to filter/show them dynamically on the form using your client script (using g_form.removeOption() or similar logic).

 

This way, the Flow Designer will be able to recognize all the possible values upfront, and you’ll be able to use them in your "If" condition without any issue.

 

Let me know if that makes sense or if your use case involves too many values to manage like this .............

 

🔹 Please mark Correct if this solves your query, and 👍 Helpful if you found the response valuable.

 

Best regards,
Aniket Chavan
🏆 ServiceNow MVP 2025 | 🌟 ServiceNow Rising Star 2024