Convert a string of task Sys IDs to number in Flow Designer

Brian Bouchard
Mega Sage

I have a flow designer flow that is intended that is triggered when a catalog item is disabled in the Service Catalog.

The flow does a Lookup Records for al RITMs where the catalog item is the same are the trigger catalog item and the RITM is still active.  The result is a string of sys ids of the found RITMs.  I'd  like to end up with a string of RITM #s instead of the sys ids which can be included as part of a task or notification, but I'm not sure the best way to do this in Flow Designer.

Thoughts?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you need to use custom action and pass the sys_ids and return output as numbers as comma separated

Regards
Ankur

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

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you need to use custom action and pass the sys_ids and return output as numbers as comma separated

Regards
Ankur

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

Bimschleger
ServiceNow Employee
ServiceNow Employee

Ankur's approach works.

Below is an alternative to consider, assuming two things:

  • Your mention of "RITM #" is equivalent to "RITM0012345"
  • You are on Quebec or newer.

This approach uses a loop and flow variables to get you a string of all the RITM Numbers:

First, create a flow variable 'RITM_string" of type 'string'. Then, in your flow, build:

  • Lookup records on RITM table (creates data pill RITMs)
  • For each RITM... (this creates the data pill {{RITM}}
    • Set flow variable "ritm_string" to "{{ritm_string}} {{RITM.number}},"

I attached a screenshot of a similar approach that I have used for Incidents. The output is something like: 

"INC0010023,INC0010025,INC0010026,INC0010029,INC0010030,"