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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to disable button ...
Power Apps
Unanswered

How to disable button when we are navigating from different screen

(0) ShareShare
ReportReport
Posted on by 100

Actually the scenario is that I have to disable one button(Submit Button) which is in User screen , when it is navigating from Screen 1  and when it is navigating from screen 2 it should allow to edit that button (Submit button).

 

Note - The button (Submit Button) is in same screen only, that is User Screen.

So how can we give condition for this case?

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Set two Variables in the Two screens Navigating Buttons:

    1. On Screen 1 (Disable button) :  Set(DisableButton,true); Navigate(UserScreen)

    Then On DisplayMode the SubmitButton: If(DisableButton,DisplayMode.Disabled,Edit)

     

    2. On Screen 2 (Enable button) :  Set(DisableButton,false); Navigate(UserScreen) 

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Saurabh-704 Profile Picture
    100 on at

    Thank you @eka24 for the answer. Can we give two buttons inside that set button or what else can we do?. 

    Suppose two button is their , with submit button ..one back button is also there. So if "submit button" is in editable mode, then "back" button should be disable and vice n versa.

    So , How can we do this?

  • Verified answer
    eka24 Profile Picture
    20,923 on at

    If you want another button to disabled while the another is enabled, then On the Back Button Put: If(!DisableButton,DisplayMode.Disabled,Edit) on the DisplayMode of the Back button. Note the !

    With this when submit is enabled back is disabled and vice versa.

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @Saurabh-704 ,

     

    @eka24workaround is great, I just add one more thing.

    If set the DisableButton Variable to false in Onhidden property of User screen, there is no need to configure the Screen2 Navigate button code.

    This means that the button becomes disabled only when navigating from screen 1 to the user screen and becomes available again when the user screen disappears, which is sufficient for the current scenario and avoids configuring more navigation buttons if there are more screens to navigate to the user screen.

    Hope this helps.

    Sik

  • Saurabh-704 Profile Picture
    100 on at

    Thank you so much for help. @eka24 and @v-siky-msft 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard