- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 11:38 AM
I have created a form to add users to Servicenow groups.
For that I created a MRV with 2 reference fields (User name and Group name:
My flow is not passing the For Each Item step, can someone please tell me what is the right way to add the users from that reference inside MRV to the group.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 12:38 PM
Hi @rafaelalves4337,
The Flow looks ok to me, can you share some screenshots of individual actions?
I have created something similar in the PDI and it works fine, note that it will throw an error if the user is already a member of the group.
And what did you mean by is not passing the For Each Item step? Did you get an error of some sort?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 11:47 AM
Take a look at this post: https://www.servicenow.com/community/now-platform-forum/how-do-i-iterate-through-a-multi-row-variabl...
If that still doesn't work you may need to create a custom action to use with the "For Each" step. (KB0793340) Here is a community post on how to create the custom action: https://www.servicenow.com/community/developer-blog/using-list-collector-in-flow-designer-for-each-l...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 12:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 12:38 PM
Hi @rafaelalves4337,
The Flow looks ok to me, can you share some screenshots of individual actions?
I have created something similar in the PDI and it works fine, note that it will throw an error if the user is already a member of the group.
And what did you mean by is not passing the For Each Item step? Did you get an error of some sort?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 12:53 PM
I just changed mine to match yours and now it worked partially, it's 2 users in that MRV (2 rows), but the flow only got the first user, the second user was not added to the group.