cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MathijsM
Helper II
Helper II

Apply to each error

Hello guys, 

 

Im trying to build a flow, where a new item added in a sharepoint list eventually results in an automatic e-mail. 

However, I'm getting this error when testing the flow. Does anyone know how to solve this challenge?: 

 

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/Trainer']' is of type 'Object'. The result must be a valid array.

 

MathijsM_0-1660571078209.png

 

Trying to fix this for a few hours now.. Your help would be amazing and I would be very grateful. 

 

Kind regards,

Mathijs

 

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User
Super User

@MathijsM 

Check to be sure that the Trainer column is set to allow for multiple selections.  The error you see will be generated if it is set to allow for only one account to be selected.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

5 REPLIES 5
ScottShearer
Super User
Super User

@MathijsM 

Please post a screen shot of your Flow in edit/design mode.

What type of column is Trainer?

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

@ScottShearer Thanks for your reply! 

Here two screenshots of the full flow and the apply to each activity.

The Column type of Trainer is Person/Group. 

 

MathijsM_0-1660574564757.png

 

MathijsM_1-1660574592439.png

 

ScottShearer
Super User
Super User

@MathijsM 

Check to be sure that the Trainer column is set to allow for multiple selections.  The error you see will be generated if it is set to allow for only one account to be selected.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Hi @ScottShearer Thanks for your answer! I did what you advised me to do, but unfortunately I'm getting the same error. You mean this right:? 

MathijsM_0-1660635000733.png

 

Hi @ScottShearer , now it works!!

Don't know what I did after, but it seems like your solution is the proper one! Thanks a lot 😁

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.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (6,436)