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 / Setting the button dis...
Power Apps
Unanswered

Setting the button display property from another button

(0) ShareShare
ReportReport
Posted on by 90

Hello Everyone,

 

I have a "Save" button & "Add Another". I want the user to Save before adding another record. So I have disabled the "Add Another" and I want to set it when the button "Save" is clicked. 

 

How can I do that?

 

Thanks in advance

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Lana 

    Put this code in the OnVisible property of your screen which holds the Form.

    Set(varDisableAddAnother, true)

     

    Then put this code in the DisplayMode property of the Add Another button

    If(varDisableAddAnother=true, DisplayMode.Disabled, DisplayMode.Edit)

     
    When the user has saved the record you want to enable Add Another.  So put this code in the OnSuccess property of the Edit Form.

    Set(varDisableAddAnother, false)

     

    Now it should work... but you'll want to put this code in the OnSelect property of the Add Another button as a final step to change the Form to New Mode and disable the Add Another button once again.

    NewForm(Form1);
    Set(varDisableAddAnother, true)

     

    ---
    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."

  • Joel CustomerEffective Profile Picture
    3,224 on at

    Set a context variable to false on load of the screen and when the save button is selected, set it to true. Set the visible property of the add new button to the context variable value 

     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard