cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Andrew260z1
Level: Powered On

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
Super User
Super User

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

2 REPLIES 2
Super User
Super User

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

Andrew260z1
Level: Powered On

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
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 443 members 5,834 guests
Please welcome our newest community members: