- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2020 03:17 AM
Hi
I try to get my JSON array output to work in the flow designer for each step.
But it just count 0 of 0
The output is from a Powershell script and run thru the JSON parser in the action step
The JSON Object array output:
{ "root": { "root_array": [ { "ID": "1", "IDA": { "CollectionID": "SMS00001", "CollectionMemberCount": "270", "CollectionName": "All Systems", "CollectionType": "2" }, { "ID": "12", "IDA": { "CollectionID": "CHQ00016", "CollectionMemberCount": "1", "CollectionName": "TestU", "CollectionType": "1" } }
}
}
}
How can i make the for each item loop to work?
( I'm new to ServiceNow so bare with me 🙂 )
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2020 08:32 AM
If you click on your action in the flow execution details. Does it return the correct values like this under "runtime values"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2020 05:14 AM
Had shorten this output in the step so my template didn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2020 08:22 AM
To get everything correct, after creating it on the Parser, I save it as a template and then use that template to build the output structure. Did you remember to also map the data pill from the parser to the output variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2020 08:23 AM
Nevermind, saw that when you ran the action standalone, it works like it should.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2020 08:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 02:11 AM
Was something wrong in my template.
And I didn't see the difference between action and step output.
But now it works 🙂
Thanks for your help. It made me see where I had the issue