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

Patch Function - Updating 2 columns in an SP List - Button Onselect.

Hello,

 

I am updating an SPList from the browse gallery.

Users tick a checkbox control and select a save button to update the SP list.

This works using

 

ForAll(Filter(BrowseGallery1.AllItems, Checkbox1.Value, ), Patch(SearchFilterTest,{ID:ID},{'SharePointColumn':Checkbox1.Value}))

 

However now I need a second checkbox and have that update the SharePoint list as well when the save button is clicked.

All other columns in the SPList are staying the same.

Can anyone help with how to add a second update 

{'SharePointColumn2':Checkbox2Value} to the patch function

 

Many thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Meneghino
Level 10

Re: Patch Function - Updating 2 columns in an SP List - Button Onselect.

ForAll(Filter(BrowseGallery1.AllItems, Checkbox1.Value, ), Patch(SearchFilterTest,{ID:ID},{'SharePointColumn':Checkbox1.Value}, {'SharePointColumn2':Checkbox2.Value}))

OR

 

ForAll(Filter(BrowseGallery1.AllItems, Checkbox1.Value, ), Patch(SearchFilterTest,{ID:ID},{'SharePointColumn':Checkbox1.Value , 'SharePointColumn2':Checkbox2.Value}))

 

View solution in original post

3 REPLIES 3
Meneghino
Level 10

Re: Patch Function - Updating 2 columns in an SP List - Button Onselect.

ForAll(Filter(BrowseGallery1.AllItems, Checkbox1.Value, ), Patch(SearchFilterTest,{ID:ID},{'SharePointColumn':Checkbox1.Value}, {'SharePointColumn2':Checkbox2.Value}))

OR

 

ForAll(Filter(BrowseGallery1.AllItems, Checkbox1.Value, ), Patch(SearchFilterTest,{ID:ID},{'SharePointColumn':Checkbox1.Value , 'SharePointColumn2':Checkbox2.Value}))

 

View solution in original post

LauraLee
Level: Powered On

Re: Patch Function - Updating 2 columns in an SP List - Button Onselect.

Thank you so much, this first one worked !! Man Happy

 

 

LauraLee
Level: Powered On

Re: Patch Function - Updating 2 columns in an SP List - Button Onselect.

An update on this for anyone starting out like me..

 

ForAll(Filter(BrowseGallery.AllItems, First_CheckBox.Value),Patch(test,{ID:ID},{ SPColumn1:First_CheckBox.Value, SPColumn2:Second_CheckBox.Value}))

 

Only updates when the First check box control or both are ticked.

 

To update the SP List I need to change the filter to BrowseGallery.AllItems, First_CheckBox.Value Or Second_CheckBox.Value

 

ForAll(Filter(BrowseGallery.AllItems, First_CheckBox.Value Or Second_CheckBox.Value),Patch(test,{ID:ID},{ SPColumn1:First_CheckBox.Value, SPColumn2:Second_CheckBox.Value}))

 

 

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

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