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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Two different patch bu...
Power Apps
Unanswered

Two different patch buttons in same screen, prevent toggle to reset to default on first patch

(0) ShareShare
ReportReport
Posted on by 15

Hi, I have an app where my gallery lists items from a SharePoint list. To be able to bulk update (required), I have created a

"toggleAll" outside the gallery and a "toggleSelect" inside each item that is set to having default value = "toggleAll.Value".

 

Challenge: On each item inside the gallery I have a button that saves input text directly to the SharePoint list, but when you click it, the default value of the "toggleSelect" is triggered. I don't want this to happen, especially if the "toggleSelect" has been set to false/unchecked (even though the "toggleAll" is true/checked). This is the code for the save button for each inserted text:

 

 

 

Patch(
 BulkUpdateV1,
 ThisItem,
 {
 Comments: TxtComment.Text
 }
);
Notify("Comment successfully saved");

 

 

 

 

In addition, I have another button that submits the toggle values and that works fine, using code: 

 

 

 

ForAll(
 Filter(Gallery1.AllItems, ThisRecord.toggle_ItemSelected.Value = true) As galItem,
 If(!IsBlank(TxtComment.Text),
 Patch(BulkUpdateV1, LookUp(BulkUpdateV1.ID, ThisRecord.ID = galItem.ID),
 {
 Approved: {Value: "Approved"}
 }
 )
));

Navigate(Thanks, ScreenTransition.Fade);

 

 

 

 

Any tip on how I can prevent the change of the "toggleSelect" when saving the comment text?

 

Kind regards,

Asbjørn Nielsen

 

Categories:
I have the same question (0)
  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    What is the toggleAll formula?
    Did you put the statement somewhere: Gallery.Selected?

  • Smalltalker Profile Picture
    15 on at

    Hi and thanks for responding, the toggleAll does not have any other formula, but the Default value of toggleSelect is equal to "toggle_SelectAll.Value".

    Smalltalker_0-1679656487834.png

     

    I'm not sure this is the best way to handle it and have been looking into using Collection as a possible workaround. Please let me know if you need more input to understand what I'm trying to achieve here.

     

    Br,
    Asbjørn Nielsen

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard