We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Alternative to “Run Script” in Flow Designer for Updating Reference Fields from RITM List Collector

Puneet Hegde1
Tera Guru

Hi All,

I have a custom table that contains a reference field pointing to cmdb_ci_service.

My requirement is:

  • When a Request (RITM) is triggered

  • I need to take values from a List Collector variable (Ci's selected on the catalogue item)

  • And add those selected machines to the reference field on the related custom table record

Previously, when working with Workflow, using Run Script made this type of server-side logic straightforward (looping through list collector values, adding values instead of updating all values in the fields, handling GlideRecord operations, etc.).

However, in Flow Designer, there is no OOB “Run Script” action available like Workflow had. Because of that, implementing this logic purely with standard actions (Update Record, Look Up Record) is becoming complex.

So my question is:

  • Is there a recommended alternative pattern in Flow Designer for handling this type of server-side scripting logic?

  • Has anyone built a reusable custom Action that behaves like a “Run Script” utility?

  • If yes, how are you handling inputs (e.g., list collector values from RITM) and looping logic?

  • Are there any best practice considerations for this approach in scoped apps?

I’d appreciate any guidance or architectural recommendations.

Thanks in advance.

1 REPLY 1

SAI VENKATESH
Kilo Patron

Hi @Puneet Hegde1 

 

You can create custom action and use Script” functionality where you can send inputs from flow to custom action .

 

 

thanks and regards 

Sai venkatesh