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

Community site session details

Session Id : vI3klFqa06a/+5wnpyQYJC
Power Apps - Building Power Apps
Answered

How to toggle label visibility with a button/icon

Like (0) ShareShare
ReportReport
Posted on 9 Sep 2022 06:30:48 by 347

I have a help icon and a help label with some text. By default I would like the label to not be visible. When the help icon is clicked if the label isn't visible I would like it to be set to visible and the label is visible clicking on the icon should hide it, toggling the visibility. I have tried to follow these steps but once the label appears clicking the icon doesn't hide it, and also the label doesn't get hidden by default.

I have the same question (1)
  • Verified answer
    MVP-Phipps Profile Picture
    3,494 Super User 2024 Season 1 on 09 Sep 2022 at 06:43:04
    Re: How to toggle label visibility with a button/icon

    One workaround is to have two icons. One that hides and one that shows the label. Obviously only ever showing one so for example


    On Click property:

    Icon 1 - Set(IconVisible, false); Set(LabelVisible, true)
    Icon 2 - Set(IconVisible, true); Set(LabelVisible, false)

    Visible Property:

    Icon1 - IconVisible

    Icon2 - IconVisible

    Label - LabelVisible

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • Power_Automater Profile Picture
    347 on 13 Sep 2022 at 00:33:38
    Re: How to toggle label visibility with a button/icon

    This is a great idea @phipps0218 , I have done the above now but I am wondering how do I set the initial values of these variables? I have added the following to the screen OnVisible and the App OnStart but all of the objects are still not showing, I am guessing due to the variable being set to "no value" by default?

    Set(IconVisible, true); Set(LabelVisible, false)

  • Power_Automater Profile Picture
    347 on 13 Sep 2022 at 01:05:47
    Re: How to toggle label visibility with a button/icon

    Never mind, I found the Run OnStart button in the App triple dot menu. Thank you

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard
Loading complete