logo

NJP

Flow Designer - For Each/ ForEach Converter - JSON or Comma Separated String

Import · Jun 17, 2022 · article

Hi All,

Ever find yourself using the Flow Designer and wishing that the For Each iterator could accept your specific data set rather than the standard 'Array data pill, List data pill or Records data pill'?

Here I have built a very simple action that can be used to do exactly that. I am finding it very useful - I hope you do too.

An xml file is attached with this article that contains the action - do let me know what you think of it...

Inputs are one of either:

  • Flat JSON - Name-Value or;
  • Comma separated string

Output is: Array.String data pill that can then be used within the For Each Iterator.

Inputs can be manually constructed from a Flow Variable OR taken from a field on a record - whatever you like. As long as the input is either a flat JSON Name-Value OR a comma separated string you will get the result you need...

View original source

https://www.servicenow.com/community/developer-articles/flow-designer-for-each-foreach-converter-json-or-comma-separated/ta-p/2301881