cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Checkbox Value needs to Patch or UpdateIf to SharePoint List

Originally - I thought this was going to be an easy one but I am still struggling with it.

 

I need some help on the approach and code for this.

 

I have a Gallery that has a Checkbox bound to each record.  I need to update my SharePoint List named ProjectSourceMatch with the value of the Checkbox using either Patch or UpdateIf.  I have tried using the OnCheck,OnUncheck, and OnSelect functions for the Checkbox with update code unsuccessfully.  I have also tried using a TextInput OnChange with code with Default set to: If(Checkbox3.Value=true,1,2) thinking that when the value changed it would trigger the OnChange function but it does not unless there is a manual entry into the TextInput (which is not an option).  I have attached an image of my test model.

 

Any help would be greatly appreciated - Thanks, Marc...

 

Checkbox Issue.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

Re: Checkbox Value needs to Patch or UpdateIf to SharePoint List

OnCheck:      Patch(YorDatabaseName, GalleryName.Selected, {Attendent: “Yes”})

OnUncheck:  Patch(YorDatabaseName, GalleryName.Selected, {Attendent: “No”})

Default:         If(ThisItem.ColumnNameLinkedToCeckBox="Yes",true,false)

View solution in original post

3 REPLIES 3
Highlighted
Memorable Member
Memorable Member

Re: Checkbox Value needs to Patch or UpdateIf to SharePoint List

OnCheck:      Patch(YorDatabaseName, GalleryName.Selected, {Attendent: “Yes”})

OnUncheck:  Patch(YorDatabaseName, GalleryName.Selected, {Attendent: “No”})

Default:         If(ThisItem.ColumnNameLinkedToCeckBox="Yes",true,false)

View solution in original post

Highlighted
Frequent Visitor

Re: Checkbox Value needs to Patch or UpdateIf to SharePoint List

Hey, this got me halfway. 

i have oncheck onuncheck and default setting like this and it works when i check the box.

But when i uncheck the box it displays  the right data change and uncheks the box for a few second, but returns to checked and also patches the data to "Yes" again.

any ideas would be appreciated.

 

Details:

Onedrive excel file

Using gallery and Toggle(Is there a difference using this and normal checkbox?)

Toggle: 

Oncheck: Patch(Attendees;ThisItem;{Arrival:"Yes"})

Onuncheck: Patch(Attendees;ThisItem;{Arrival:"No"})

Default: If(ThisItem.Arrival="Yes";true;false)

 

So everything works until u accidentaly check someone and want to uncheck Smiley Tongue

 

 

Highlighted
Frequent Visitor

Re: Checkbox Value needs to Patch or UpdateIf to SharePoint List

Same problem, is there a solution ?

 

Thanks !

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,586)