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 / Patch formula help Onc...
Power Apps
Unanswered

Patch formula help Oncheck of Checkbox

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

Hi,

 

I am trying to update my status based on the check of a checkbox.

I want to update each record in my browsegallery every time i check the box. I want to switch the status to Complete.

 

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?

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at
    Patch(['Data Source'], {ID:ThisItem.ID, Status_two: {Value:"Complete"}})

    assuming status two is a choice column

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

    @TheRobRush 

     

    getting error specified column "ID" does not exist.

     

    but i do have it in my SP list - 

     

    wonka1234_0-1693335688814.png

     

     

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Weird, maybe just try this way then 

    Patch('Data Source', ThisItem, {Status_two: {Value:"Complete"}})
    
  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @TheRobRush  now im getting column Status_two doesnt exist!

     

    but it does!

     

    wonka1234_0-1693339660907.png

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    what is the gallery items code

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

    @TheRobRush 

     

    BrowseGallery1 Items code -

     

    SortByColumns(
    	Filter(
    		[@'Data Source'],
    		If(
    			Dropdown3.Selected.Value = "Filter for Request Status", 
    			Status_two.Value = "New Request" Or Status_two.Value = "GCO Assessment" Or Status_two.Value = "Complete", 
    			Status_two.Value = Dropdown3.Selected.Value
    		)
     And
     If(
     Filter_for_GCO_Lead.Selected.Value = "Filter for GCO Lead",
     'GCO Lead_three' = "email@gmail.com" Or 'GCO Lead_three' = "email2@gmail.com",
     'GCO Lead_three' = Filter_for_GCO_Lead.Selected.Value
     )
    		And
    		(StartsWith(
    			Control_two.Value,
    			'search box'.Text
    		)
     Or
     StartsWith(
    			ID_three,
    			'search box'.Text
    		))
    	),
    	"Title",
    	If(
    		SortDescending1,
    		SortOrder.Descending,
    		SortOrder.Ascending
    	)
    )
  • TheRobRush Profile Picture
    11,128 Moderator on at

    go to your sharepoint list, in upper right click the gear symbol and click list settings, then on next screen click the name of column 'Status_two' then look in address bar to make sure column name is ACTUALLY status_two, sometimes they ar enot

     

    see image

    TheRobRush_0-1693340349302.png

     

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

    @TheRobRush  looks okay here !

     

     

    wonka1234_1-1693340538361.png

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    just to see if it changes, place a gallery in the app with just the bare sharepoint list as the source (none of the filters sorts etc) and just place a button in there that does 

    Patch('Data Source', ThisItem, {Status_two: {Value:"Complete"}})

    and see if it gives you same issue, maybe narrow down whats happening

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

    Yup so when I do a vertical gallery, add a button, on select add what you have above, the status changes and is doing the correct action lol. sigh this is so confusing.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard