cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Patch sharepoint list one column

I've been looking at some other posts but they sort of confuse me, I have a list of users who we do firedrills for and once that drill is finished I just want to reset the status of all people back to "Not Reported"

 

Seems to be suggestions to use a gallery and use the ForAll to loop through but do I have to ensure that all SharePoint list columns are in this statement, I just want to patch the one column (which is a dropdown as shown in the code).

 

ForAll(AllUserGallery.AllItems,Patch(UserList,Defaults(UserList),{Title:AllUserGallery.Selected.Area,Status:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Id:4,Value:"Not Reported"}}))
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Patch sharepoint list one column

Hi @Andrew260z1 

Depending on the source list of users that you want to update, I would investigate the use of the UpdateIf function.

This would enable you to update a single a single column in multiple rows.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-update-updateif

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Patch sharepoint list one column

Hi @Andrew260z1 

Depending on the source list of users that you want to update, I would investigate the use of the UpdateIf function.

This would enable you to update a single a single column in multiple rows.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-update-updateif

View solution in original post

Highlighted
Helper I
Helper I

Re: Patch sharepoint list one column

thanks for that I knew I was going about it the wrong way.

 

what worked for me

 

UpdateIf(UserList,!(Status.Value="Not Reported"),{Status:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Id:4,Value:"Not Reported"}})

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,155)