cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Am4ree
Frequent Visitor

Disabled Multiple Button

Hi,

 

I just join this forums and create my first application, however I'm struggle with disabled button and how I can achieved with below scenario.

 

I have 2 screen

 

1. Lesson Menu (Screen1)

- 10 Button

-  Deafult - Displaymode.edit for lesson1 and other are Disabled

2. Lesson Details (Screen2)

- Icon back to Screen1

 

Scenario,

 

When User click lesson1 button it will goes to screen2 to watch the lesson once finish when user click Icon back it will goes to Screen1 with conditions Lesson1 button become displaymode.disabled and lesson2 button become DisplayMode.Edit same also with Lesson2 button when click it will goes to another screen and when hit back button it will goes to Screen1 with conditions Lesson1button Displamode.disabled, Lesson2button Displamode.disabled but lesson3 button become displaymode.edit.

 

Am4ree_0-1653452588447.png

Am4ree_1-1653452711622.png

 

Appreciated if anyone can help.

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
DamoBird365
Super User
Super User

Hi @Am4ree 

 

Create a variable for your button state on app start.

 

DamoBird365_0-1653578858176.png

 

Set(ButtonState,{
Button1:DisplayMode.Edit,
Button2:DisplayMode.Disabled,
Button3:DisplayMode.Disabled,
Button4:DisplayMode.Disabled
}
)

 

Create your buttons and set the displaymode as ButtonState.Button1, Button2 etc.

DamoBird365_1-1653578927223.png

OnSelect, navigate to your next screen and then on the back button, update the state of the next button.

 

DamoBird365_2-1653578987214.png

 

Set(ButtonState,{
Button1:DisplayMode.Edit,
Button2:DisplayMode.Edit,
Button3:DisplayMode.Disabled,
Button4:DisplayMode.Disabled
}
);
Navigate(Home)

 

Hope this is what you are looking for.


Cheers
Damien

Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts. Thanks

View solution in original post

2 REPLIES 2
DamoBird365
Super User
Super User

Hi @Am4ree 

 

Create a variable for your button state on app start.

 

DamoBird365_0-1653578858176.png

 

Set(ButtonState,{
Button1:DisplayMode.Edit,
Button2:DisplayMode.Disabled,
Button3:DisplayMode.Disabled,
Button4:DisplayMode.Disabled
}
)

 

Create your buttons and set the displaymode as ButtonState.Button1, Button2 etc.

DamoBird365_1-1653578927223.png

OnSelect, navigate to your next screen and then on the back button, update the state of the next button.

 

DamoBird365_2-1653578987214.png

 

Set(ButtonState,{
Button1:DisplayMode.Edit,
Button2:DisplayMode.Edit,
Button3:DisplayMode.Disabled,
Button4:DisplayMode.Disabled
}
);
Navigate(Home)

 

Hope this is what you are looking for.


Cheers
Damien

Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts. Thanks

Am4ree
Frequent Visitor

Hi Damien,

 

I have tried and its works.

 

Appreciated for your help 👍

 

Thanks.

Am4ree

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,194)