web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Checkbox on BrowseGall...
Power Apps
Unanswered

Checkbox on BrowseGallery, How to Change field value based on check

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

Hi,

 

I have a checkbox like so  in my browsegallery - 

wonka1234_0-1693320725148.png

I want to change my status field on check. 

 

I have this in my OnCheck property - 

 

Set(statusupdate,"Complete"); SubmitForm(EditForm1);

 

however nothing is happening. How can I change my status based on check property for each record in my browwsegallery?

 

 

wonka1234_2-1693320891146.png

 

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Add the Checkbox to the Gallery Template (the first record in the gallery that you edit with the pencil icon). Then bind that Checkbox to the value of ThisItem.statusupdate as the default.  You'll need to use an IF statement to set the checked property when the gallery loads and then use a Patch to save it since you are editing a Gallery and not a Form so there is no SubmitForm()

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @Pstork1  thank you.

     

    Which property do you mean as "Checkbox value" is that default or oncheck? -

     

    What I have so far - 

     

    OnCheck = Set(gblRecordID, ThisItem.ID)    

     

    How should the if statement be setup? 

     

     

     

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Use an IF() statement in the Default property of the checkbox to set the value of each item when you load the gallery.  If you want to save the value when the checkbox is checked or unchecked Set an appropriate Patch() statement in the OnCheck and OnUncheck properties.  the if statement would be something like

    if(thisItem.statusupdate.Value = "Complete",true,false)
  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    okay  just need help with why we are setting default property to this if statement.

    what is this doing? 

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    Trying this for patch

    Patch(['Data Source'], ThisItem.Status_two.Value, Status_two.Value = "Complete")

     

    also trying this -

     

    Patch(['Data Source'], ThisItem.Status_two , {Status_two:Complete})

     

    where am I going wrong?

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    I think it should be something more like this

    Patch(['Data Source'], ThisItem, {updateStatus: {Value = "Complete"}})

    assuming the column name is updatestatus.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard