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

How to set default value of check box (always ticked at start screen)

Hi,

I try to put checkbox input on gym booking card collect and card return (patching) on galery. My issue everytime new row coming to galery , the checkbox of collection (card collected) default always check
Anyhow how to set default of the checkbox ?
this my formula for 
Oncheck :

Patch('Gym Pass',BrowseGallery5_1.Selected,{Collection:Checkbox1.Value})

Onuncheck:

Patch('Gym Pass',BrowseGallery5_1.Selected,{Collection:Checkbox1.Value})

default:

If(ThisItem.Collection=true,true,false)

 Note :
Gym Pass = share list point; Collection = column name in SP List (i use yes/no)
data success patch when tick/untick 
Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@laurent_rio 
What code are you using to add a new record to the gallery's collection?  Your code above looks good so my theory is your code to add new records is giving the field 'Collection' a value of true by default.  One idea to fix this is to set the default value to "false" in the SharePoint column.  Another is to PATCH a "false" value when creating the record.

Please share your 'new record' code so I can advise on what to do.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

1 REPLY 1
Super User III
Super User III

@laurent_rio 
What code are you using to add a new record to the gallery's collection?  Your code above looks good so my theory is your code to add new records is giving the field 'Collection' a value of true by default.  One idea to fix this is to set the default value to "false" in the SharePoint column.  Another is to PATCH a "false" value when creating the record.

Please share your 'new record' code so I can advise on what to do.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,759)