cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tiemo_123
Helper II
Helper II

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

@tiemo_123 

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

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.

View solution in original post

ArchitectMadhan
Responsive Resident
Responsive Resident

Hi @tiemo_123,

 

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.

Hi @Drrickryp ,

 

This worked perfectly! Thank you so much.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,165)