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 / Disabling Button OnCli...
Power Apps
Unanswered

Disabling Button OnClick within Gallery

(0) ShareShare
ReportReport
Posted on by 7

I have a button in a vertical Gallery which acts as a toggle for the user to select either "working" or "not working". The problem I have is when the button is clicked it changes the properties for every button in every cell.

 

 

If(
 Button1State = "Edit",
 UpdateContext({ Button1State: "Disabled", Button3State: "Edit" }),
 UpdateContext({ Button1State: "Edit", Button3State: "Disabled" })

)

 

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @Darragh924 ,
    Try using below formulas - 
    1. In DisplayMode property of button 1- 

    If(Button1State="Disabled" && BtnID = ThisItem.ID,DisplayMode.Disabled,DisplayMode.Edit)

    2. OnSelect property of button 1 -

    If(
     Button1State = "Edit",
     UpdateContext({ Button1State: "Disabled", Button3State: "Edit", BtnID:ThisItem.ID}),
     UpdateContext({ Button1State: "Edit", Button3State: "Disabled", BtnID:ThisItem.ID})
    
    )

    ID is column name. It can be changed to another other column name (it has to be unique).

     

     

  • Darragh924 Profile Picture
    7 on at

    @NandiniBhagya20 

    I need the button to stay disabled in that specific cell of the gallery. But the other cells remain unaffected unless the user does something. Is there any way to accomplish this?

  • Aaron_Morva Profile Picture
    38 on at

    Hey @Darragh924

     

    is it possible for you to provide some screenshots of the toggle and the gallery? 

  • Darragh924 Profile Picture
    7 on at

    Vechile Maintenance.PNGss.PNG

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

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard