Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
555 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | Power Automate (21 exercises) |
Topic ==> | Apply to each loops (3 exercises) |
Level ==> | Average difficulty |
Subject ==> | Power Automate and PAD training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
Make sure that in a OneDrive folder you have some files and some folders:
We'll look at our root OneDrive folder for this example.
Create a new flow called Exercise NN - List folders only. Add a OneDrive List files in folder action to get details of all of the files and folders in this folder.
Add the following actions:
Action | What it should do |
---|---|
Initialize variable | Create an empty array called FolderNames (this will hold the display names of all of the subfolders found in our folder) |
Apply to each | Loop over all of the files and folders returned from our List files in folder action |
Condition | Within this loop, test whether this is a folder or not (there's a boolean field which gives this information) |
Append to array variable | If we've found a folder, add its display name to our FolderNames array |
Compose | At the end of the loop, show the arrray of folder names found |
Your final Compose action should show something like this:
You should see a list of folders found.
Add a tracked property to your Initialize variable action and set this to the current date/time using the UtcNow() function, then reference this to show the execution time of your Apply to Each loop:
Your final Compose action should show the execution time too.
Your Compose action should look like this:
The expression should take the difference between the number of ticks now and the number of ticks from the previously recorded tracked property, divide this by 10,000 and then convert this to a string for display within your Compose task!
If you get all this done, it's definitely time for a break!
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.