cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BIMSupport
Regular Visitor

Apply To Each action Expression Failure

Hello, 

I am creating a flow to be used within our Onboarding Process in SharePoint.  When a new hire is added to a list in the SharePoint site, it creates a series of events to be added to the Outlook Calendar on the new employee's start date.  I need to add a condition to my flow, if the new hire's department is equal to 'Production' then they get one set of events, and if their department is anything else they get a different set of events.  I am getting the below error on the Apply to Each function.  In my limited experience, I have always used the ID from the previous function in this field (in this case, When item is created in SharePoint), however it is returning the Expression Evaluation Failure, pictured below.  I have also tried using the Employee Id which is our unique identifier.  I appreciate any thoughts you may have. Thank you. 

 

Capture 1.png

 

Capture 2.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
annajhaveri
Super User
Super User

Hello,

 

Why are you using Apply to Each in your flow, apply to each is used when you want to loop through a collection. Here you are looping through ID, ID is a number value and its not a collection, that is why it is resulting to error. You can remove move the Condition action outside the apply to each and remove the apply to each if you dont need to loop through the collection as from the screenshot i dont see any collection defined in your Flow.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
annajhaveri
Super User
Super User

Hello,

 

Why are you using Apply to Each in your flow, apply to each is used when you want to loop through a collection. Here you are looping through ID, ID is a number value and its not a collection, that is why it is resulting to error. You can remove move the Condition action outside the apply to each and remove the apply to each if you dont need to loop through the collection as from the screenshot i dont see any collection defined in your Flow.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,870)