cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to make button visible, when a user changes the value of slider?

Hi,

 

I have 3 sliders (Slider1), (Slider2), (Slider3), and one Button (Button1). What I want to do is, until the user has changed the value or pressed on all three sliders, make button visible. 

 

Can anyone help me?

1 ACCEPTED SOLUTION

Accepted Solutions

Set the minimum value of the sliders to 0 and set the DisplayMode property of the button to 

 

If(
    Slider1.Value <> 0 && Slider2.Value <> 0 && Slider3.Value <> 0,
    DisplayMode.Edit,
    Disabled
)

 

This will require that all three sliders have to be changed from the default.

View solution in original post

5 REPLIES 5
Drrickryp
Super User
Super User

@Anonymous 

Add an UpdateContext({showbutton:true}) to the OnChange property of the sliders.  Set the visible property of the button to showbutton.  Somewhere you will need to have a way to reset the button's visibility to false with and 

UpdateContext({showbutton:false}) in the OnVisible property of the screen with the sliders and with another button that resets the sliders and the showbutton variable, perhaps in the OnSelect property of the button. You will also have to account for the sliders being different from their defaults

!1.png

Anonymous
Not applicable

This method doesn't seem to be working for me.

 

Can we try an alternative method?

 

Is there a way to make the Button Displayed (DisplayMode.Edit) only when all the sliders have been pressed/changed by the user?

 

For the Sliders

- My Min is 1 and my Max is 5 for all of them

- Default number is 0 (so the handles appear on the left of the sliders.

Set the minimum value of the sliders to 0 and set the DisplayMode property of the button to 

 

If(
    Slider1.Value <> 0 && Slider2.Value <> 0 && Slider3.Value <> 0,
    DisplayMode.Edit,
    Disabled
)

 

This will require that all three sliders have to be changed from the default.

ArchitectMadhan
Super User
Super User

Hi @Anonymous,

 

Here is the simple one line formula to be written in the Visible property of the Button that solves your problem. Also set the default value of the slider to 0 (do this first) and then give the formula in Button's visible property.

ArchitectMadhan_1-1626802998424.png

 

ArchitectMadhan_0-1626802883359.png

If you find my solution helpful for resolving the issue, then please consider Accept it as the solution to help the other members find it more quickly.

- Architect Madhan

Please click the "Accept as Solution" button and give thumbs up, if it is helpful to you.
Anonymous
Not applicable

Hi @Drrickryp ,

 

This worked perfectly! Thank you so much.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,544)