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 / Gallery: Label show te...
Power Apps
Unanswered

Gallery: Label show text on button press

(0) ShareShare
ReportReport
Posted on by 519

Hi,

 

I have an app; when the sign out button is pressed, the button is hidden, but i would also like to add some text to the gallery, something like status: gone, is this possible?

 

AndyPowerAppNew_0-1672359151944.png

the way it works at the moment; when the signout button is pressed, the signout button is hidden, which is fine because its like a register of who is in the building, but as aswell as the function above, when the button is press, i would like some text to appear next to status: 'user left' then when the gallery is accessed again the text is shown. the end result would look like this:

 

AndyPowerAppNew_1-1672359419632.png

I have tried this, on visible of text label: If(buttonPressed = "Button1_4", true, false)

 

and this on the submit button, onselect; Set(buttonPressed, "Button1_4");

 

the above didn't work for me, please may i have some help please, what have i got wrong here?

 

Thanks

 

 

 

 

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

    @AndyPowerAppNew 

    OnSelect of button: UpdateContext({buttonPressed:true})

    Visible of text: buttonPressed

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    I think you just need to set your variable to a Boolean value, not a text value.  Assuming this variable is only used for this one function, try this:

     

    For your submit button, OnSelect:

    Set(buttonPressed,true)

     

    Visible of text label: 

    buttonPressed

     

    If the user checks in again you can set buttonPressed to false as well to hide your text box again

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Rusk 

    No need for a global variable. Also, context variable will reset every time the screen is reopened so no need to rehide the label.

  • AndyPowerAppNew Profile Picture
    519 on at

    Thank you , but where do I type or ‘hardcode’ the text label, “user left’ this is what I would like to show when I press the ‘signout’ button.

     

    Or another solution maybe , when signout button pressed, the row it the galley will disappear , ie there is a list of say 10 names, each time press ‘signout’ galley will show 9 names. But the record will still be in the SP list (just not on the gallery list)

     

    thanks again 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard