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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Foreach - loop through...
Power Automate
Answered

Foreach - loop through a list and get approval

(0) ShareShare
ReportReport
Posted on by

Hello, I'm stuck with an error in my first flow I made to manage some approvals.

All start with a sharepoint list, I need to loop this list and ask for approval only records with a certain value in a choice-type field.

I get an error just after getElements block and in the next conditional statement.

Thank you!

emanuelebordin_1-1600267389726.png

 

 

emanuelebordin_0-1600267290209.png

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    The problem is in the inner Apply to Each loop.  Can you show us a run from that with the error?  That's where the error is coming from.  What you are showing is just the rollup of that inner error.

  • Community Power Platform Member Profile Picture
    on at

    Hi, where I could get the detailed error log ?

     

    Could it be this one?

    emanuelebordin_0-1600270401562.png

     

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    No, please expand and take a screenshot of the following step in your original run.  Showing the definition would also be helpful.

    emanuelebordin_1-1600267389726.png

  • Community Power Platform Member Profile Picture
    on at

    I'll do what you asked me, but before this is there a way to detach the second loop-trough from the inner I've created for mistake?

    Do I have to rewrite the entire blocks below the second? 

    Thank you

    emanuelebordin_0-1600273332686.png

     

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    If the inner loop isn't actually dependent on the outer loop values then you should be able to cut and paste it outside the loop.

  • Community Power Platform Member Profile Picture
    on at

    Hi,
    this is the error I get, below you can see the definitions.

    Thank you

    Error messageError messageDefinitions: 1 of 4Definitions: 1 of 4Definitions: 2 of 4Definitions: 2 of 4Definitions: 3 of 4Definitions: 3 of 4Definitions: 4 of 4Definitions: 4 of 4

  • Community Power Platform Member Profile Picture
    on at

    Hello, I tried again, I'm struggling with this error, transalated it said flow is expeting a List whilst I'm passing an Object.

    How do I achieve this?

    I'm trying to get attachments from a SharePoint list and then compose an approval for each one.

    Thank you

     

    ExpressionEvaluationFailed. L'esecuzione dell'azione 'Applica_a_ogni_3' del modello non è riuscita. Il risultato della valutazione dell'espressione 'foreach' '@outputs('Ottieni_elementi')?['body']' è del tipo 'Object'. Il risultato deve essere una matrice valida.

     

    5.PNG

  • Verified answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    I'm not sure what the translation would be, but here's the basic process for creating approvals for each attachment in a list item.

    image.png

    image.png

  • Community Power Platform Member Profile Picture
    on at

    Thank you, I wrote again the steps as you suggested to me and now it works!

     

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard