For each item not working with MRV (Multi row Variable) (Reference variable)

rafaelalves4337
Tera Contributor

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:

Screenshot_197.jpg

 

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.

 

Screenshot_199.jpg

1 ACCEPTED SOLUTION

James Chun
Kilo Patron

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.

JamesChun_0-1717097876056.png

 

And what did you mean by is not passing the For Each Item step? Did you get an error of some sort?

 

View solution in original post

11 REPLIES 11

@rafaelalves4337 - can you share the execution detail of the second row?

 

For some reason it's not changing from 1 to 2, it looks like only 1 is visible

I see what's happening, you have the End flow at step 7. 

The Flow has been terminated after the first iteration, you will need to move it after For Each action.

What if I just remove the END flow?

Well, I can't see the entire Flow nor do I understand the logic behind your Flow, so I can't comment on that