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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a log file of a...
Power Automate
Answered

Create a log file of a For Each

(0) ShareShare
ReportReport
Posted on by 62

Is it possible to create a log file with all the executions of a For Each loop?

 

It's not practical to click one by one and you can't even see the evaluation of the condition (there is no Raw output)

 

2020-03-19_16-09-15.jpg

Categories:
  • Verified answer
    Jcook Profile Picture
    7,783 Most Valuable Professional on at

    Hello @mikkele 

     

    Sure, what I always do is:

     

    Initialize a array variable with [ ]

    Inside the loop, use a Append array variable and add what you want to that variable.

     

    Now you can use this variable outside the loop to check what has been executed inside.

     

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

  • mikkele Profile Picture
    62 on at

    Thanks @Jcook for the quick reply

    I have added the Append to array action in both side of the condition (not sure if this is a good way to do it)

    How can I then see the content of the array or maybe save it to a file or log it somewhere?

     

    Is it possible to log the evaluation of the condition?

     

    2020-03-19_17-08-30.jpg

     

  • Jcook Profile Picture
    7,783 Most Valuable Professional on at

    Hi @mikkele 

    Yes having on both sides of the condition might be a bit messy when trying to read the Log.

     

    I suggest you have 2 Arrays - one called True, an one called False.

     

    You could also add a but of structure to the array for example:

     

    | LastName - FirstName - UserID - Email - Active |

     

    This way you can distinguish between each record.

     

    Lastly to get or save the log somewhere. You can do basically anything with this variable now. You can:

    Send yourself an email.

    Send the variables to Teams, SharePoint.

    Anywhere you like. 

    Just make sure you do this after the loop.

     

     

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 130

Last 30 days Overall leaderboard