cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gauravsbhardwaj
New Member

How to iterate through an array and grant access to folders?

I'm getting an input for a list of countries (say) from Forms and I wish to use that list and dynamically grant access to folder with those country names. Is there an automated way of doing it? I'm currently creating a long list of if-else statements and manually entering folder IDs there.  

1 REPLY 1
DamoBird365
Super User
Super User

Hi @gauravsbhardwaj 

 

You could either use a list to store the countries and paths and perform a filter or simply create an array in your powerautomate with countries and paths, i.e.

 

{

"france":"/shared docs/france",

"germany":"/shared docs/germany",

"uk":"/shared docs/great britain",

"USA":"/shared docs/US"

}

 

You could then retrieve the path by country key.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

 

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,913)