cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mikkele
Advocate I
Advocate 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
Jcook
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
Jcook
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

 

Jcook
Super User III
Super User III

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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (38,719)