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

Create a log file of a For Each

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

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

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





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

3 REPLIES 3
Super User III
Super User III

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





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

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

 

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





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (7,990)