cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User
Super User

Re: Create a log file of a For Each

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!





View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Create a log file of a For Each

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!





View solution in original post

Highlighted
Helper I
Helper I

Re: Create a log file of a For Each

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

 

Super User
Super User

Re: Create a log file of a For Each

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!





Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (12,321)