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 / visible/hide buttons
Power Apps
Answered

visible/hide buttons

(0) ShareShare
ReportReport
Posted on by 122

Button.png

Hi.

Want two buttons on top of each other. When I press button1, button2 is displayed and button1 is hidden and vice versa. How do I do that?

I have tried this, but get an error (See attachment photo)

In the visible property of Button1;

!Knapp2.Visible

In the visible property of Button2;

!Knapp1.Visible

 

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @ENRM 
    Your method will not work because you have created conditions in each button that are dependent on one another.  This is known as a circular referernce.  You must change one of your formulas to some other condition.

    When should each button be visible?  What are the specific conditions in your app?

     

    In the visible property of Button1;

    !Knapp2.Visible

    In the visible property of Button2;

    !Knapp1.Visible

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • ENRM Profile Picture
    122 on at

    @mdevaney   I thought of having a toggle control and a save button. When you press the toggle, the save button appears. After storage, the toggle returns.

  • mdevaney Profile Picture
    29,993 Moderator on at

    @ENRM 
    If you want to use a toggle you can connect the buttons to them like this:

    In the visible property of Button1;

    toggle1.Value

    In the visible property of Button2;

    !toggle1.Value

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • ENRM Profile Picture
    122 on at

    @mdevaney Not quite like I do not want it.
    Once you have filled out the form, I will confirm it by pressing toggle1. Then the save button (Button3) is displayed. After Patch I want to switch1 to appear again, and button 3 disappears.

    If I go in and out of the app, then it's fine until the next time I enter data. But my problem is if I have to fill in new data without exiting the app.

    Not so well explained, I think.

    Skjermbilde1.JPG

     

    Skjermbilde2.JPG

     

    Skjermbilde3.JPG

     

     

  • Verified answer
    sperry1625 Profile Picture
    765 Super User 2024 Season 1 on at

    The following will work based on your description.

    Create a Variable to use as your Visible flag for the two buttons.

    Set( blnToggle, false );

    For your two button set ones Visible property = blnToggle, set the others to !blnToggle.   In both OnSelect() event for the buttons add the following:

    Set( blnToggle, !blnToggle );

    This will toggle visibility between the two buttons.

     

    I hope this is what you were looking for.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard