SOLVED

Update list items manually in sharepoint using power automate

Brass Contributor

Hello,

 

I have list , in which i want to update each list items permissions manually, means i want to trigger power automate flow manually once only, but I am not able to find any task in power automate where I can iterate each list item and update them

 

is there any task to iterate each item of the list

14 Replies

@rautchetan27 you need to get the items from your list, then add an Apply to each and inside that apply to each add a Grant access to an item or a folder action. If you are removing access you could add a Stop sharing an item or folder action instead.

 

grantAccess.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

I want to user Filter query on Get Items, on the column of type users/groups

 

Users/Group Column DisplayName must match with one value in string variable.

 

how I can i do this comparision, because column which type is groups/users is not string so comparision is not working..

 

any idea?

@RobElliott 

 

in my Filter query of "Get items"

Vendor eq 'IT'

 

where Vendor Column type is Group/users and not String/Text , thats why above query is not working.

 

I want to compare Vendor columns DisplayName with String.

How I can do that?

@rautchetan27 : You can also store the user claims in the string variable and compare.

@rautchetan27 you can't use a Person/Group column in a Filter Query.

 

So you need to get all the items from the list and then add a condition that checks if the Vendor DisplayName contains the name of your Vendor.

 

comparePersonGroup.png 

If you want to do something with all the Vendors then you could do this with a Switch control based on the Vendor DisplayName and in each case you'd add the actions related to that Vendor.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott 

 

I am same logic and condition VendordisplayName contains, but getting following error

 

Unable to process template language expressions for action 'Condition' at line '1' and column '2851': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.
 
 

 

@rautchetan27 you must make sure that the Vendor column always has a value in it and isn't empty (which is the reason for the error message).

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott 

 

Thanks, I got it and fixed it..thanks for the help..

Another thing is, In my Get items list, I have more than 1400 Records, but "Apply to each" show only 100 records,Please see attached image.

 

why this happening?

best response confirmed by rautchetan27 (Brass Contributor)
Solution

@rautchetan27 it's happening because by default Get items only returns the first 100 items. You need to go to the Settings (3 dots at the top right) for the Get items, turn on the pagination toggle and change it to something like 2000.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@Rob Elliott 

I am using "Grant access to an item or a folder" and giving Role "Can Edit" to one of the user using Flow.

 

after running flow, user able Edit Records,

 

but when I want to rollback Edit rights, I am running flow for same user and giving Role "Can view"

he is stil able to edit, what I want, read only access now and not edit

@Ashish_Kohale @RobElliott 

 

I am usingPlumsail_SP, Change sharepoint permission(please find attached screenshot)

 

but getting error,can you help

@rautchetan27 I can't help as I don't have the Plumsail Connectors

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott 

 

I am using "Grant access to an item or a folder" and giving Role "Can Edit" to one of the user using Flow.

 

after running flow, user able Edit Records,

 

but when I want to rollback Edit rights, I am running flow for same user and giving Role "Can view"

he is stil able to edit, what I want, read only access now and not edit

 

Can you answer this behavior?

1 best response

Accepted Solutions
best response confirmed by rautchetan27 (Brass Contributor)
Solution

@rautchetan27 it's happening because by default Get items only returns the first 100 items. You need to go to the Settings (3 dots at the top right) for the Get items, turn on the pagination toggle and change it to something like 2000.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

View solution in original post