web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Apply to each error

(0) ShareShare
ReportReport
Posted on by 7

ran a flow and got this error: The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@{variables('Item Count')}@{variables('Start Date')}' is of type 'String'. The result must be a valid array.

 

Apply to each Error.PNGClass Date Full Flow pt 2.PNGClass Date Full Flow pt1.PNGAnybody know a solution? See Attached. What i want to accomplish is once 30 people have signed up for the same class for the same class date they will no longer be able to sign up for that class for that date and they will be forced to sign up for a different class date. I want that to happen for every 30 sign ups per class and class date if that makes sense. I hope that helps.  Any help would be greatly appreciated. Thank You.

Categories:
I have the same question (0)
  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: Apply to each error

    Hi @Freddiet1991 

     

    You don't need "Apply to each" action. The trigger "When an item is created" will run for a single item or record so you can just compare the dynamic values from trigger directly in the condition action without using "Apply to each" action.

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

     

  • Freddiet1991 Profile Picture
    7 on at
    Re: Apply to each error

    Thanks @ManishSolanki for your help. I really appreciate it. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard