cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JanCarla
Regular Visitor

Patch Checkbox Value in a Gallery to a SharePoint with a YES/NO data type column

Hi All, 

 

I would like to ask for help how to patch the checkbox values in a Gallery to a SharePoint with a YES/NO data type column.

8 REPLIES 8
WarrenBelz
Super User
Super User

Hi @JanCarla ,

You simply patch the Value of the checkbox

Patch(
   ListName,
   LookUp( . . . .  .),
   {YesNoColumnName: CheckboxName.Value}
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Is your answer applicable to checkboxes inside a gallery? If yes, could you please elaborate how. Thank you.

Is your answer applicable to checkboxes inside a gallery? If yes, could you please elaborate how. Thank you.

@JanCarla ,

Yes as long as you patching the current record from inside the gallery.

JanCarla
Regular Visitor

But all checkboxes return true in my SPO List although I did not check them all.

@JanCarla ,
If you patch the checkbox Value, it will patch false if the box is unchecked - you did not mention multiple boxes - what is the code you are using (in Text please)

JanCarla
Regular Visitor

Sorry, but I am still new to power apps. I don't know where to start when patching multiple checkboxes in a gallery. Would you be kind to share how to do it?

@JanCarla ,

OK - it is better to patch them one at a time, but you would use something like (for updating existing records)

Patch(
   SPListName,
   ForAll(
      GalleryName.AllItems As aPAtch,
      {
         ID: aPatch.ID,
         YesNoField: aPatch.CheckboxName.Value
      }
   )
)

For new records, just leave out the ID line.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,230)