cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Thanasis
Helper IV
Helper IV

Error: Action 'Apply_to_each_2' must be a parent 'foreach' scope of action 'Condition' to be referenced by 'repeatItems' or 'items' functions.'.'.

Hello I am getting an error  and I would really appreciate some help on this. 

 

I'm trying to create a flow that compares a column in a SPlist with a 365 group and gives me the names that are missing from that list. 

This is what I get:

The inputs of template action 'Condition' at line '1 and column '3552' is invalid. Action 'Apply_to_each_2' must be a parent 'foreach' scope of action 'Condition' to be referenced by 'repeatItems' or 'items' functions.'.'.

 

 This is what I have 

 

Thanasis_0-1642783221551.png

Thanasis_1-1642783331973.png

Thanasis_2-1642783573659.png

Thanasis_4-1642783656541.png

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ManishJain
Solution Sage
Solution Sage

Hi @Thanasis ,

 

Change Items('Apply_to_each_2') to Items('Apply_to_each_3')

 

Thanks

View solution in original post

5 REPLIES 5
ManishJain
Solution Sage
Solution Sage

Hi @Thanasis ,

 

Change Items('Apply_to_each_2') to Items('Apply_to_each_3')

 

Thanks

Thanasis
Helper IV
Helper IV

Thank you @ManishJain  that did help the think is when I run it though, 

 

It gives me names that are in my SPlist, It should only give me the names that are missing from the SPlist ,

 

Any thoughts ?

ManishJain
Solution Sage
Solution Sage

What is coming in the output for MissingNames variable ?

Hello @ManishJain thanks for your help  I was able to figure one part of it. I had to change this

Thanasis_0-1642788958789.png

 

The last part is, before changing the Pagination to 5000

I was getting this 

Thanasis_1-1642789038693.png

 

Now I am getting this 

Thanasis_2-1642789073050.png

Now its reading correctly my SPlist column which so far is 335 , but it doesn't read the group right 

 

There are around 470 people in that group but only reads 100 

 

Any suggestions ?

 

Sorry about that, it was user error, I only did the Pagination for the get items, I didn't do it for List group Members.

 

All good now thank you 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,726)