Hi Colleagues, I've got a simple problem but I can't figure it out. I'd like the slider button to jump to the value given:
//onchange
If(Slider1.Value <= 50;
UpdateContext({setSliderValue: 0});;
If(Slider1.Value >= 50;
UpdateContext({setSliderValue: 100])
)
)
Default = setSliderValue
ThankYou
Please give you explain further. Is the UpdateContext on a button and are you placing the value in a Textbox
------------
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.
ThankYou, This is the slider "Onchange" event:
If(Slider1.Value <= 50;
UpdateContext({setSliderValue: 0});
//do this....
If(Slider1.Value >= 50;
UpdateContext({setSliderValue: 100})
//do else...
)
)
And the "Default" of the slider is the variable: SetSliderValue
If i click on the slider on 30 or 60 the slider handler goes to 0 or 100, but if i drag the slider to 30 or 60, then nothing happens...
Looks like the "Onchange" event isn't working properly.
Thankyou so much for any idea
Hi @Frans_365CH ,
Do you want the slider value jump to 0 or 100 based on the selected value of the slider?
I suggest you add a reset function after you set variable in the slider's OnChange.
Try to set like this:
the slider's Default:
setSliderValue
the slider's OnChange:
If(Slider1.Value <= 50;
UpdateContext({setSliderValue: 0});
If(Slider1.Value >= 50;
UpdateContext({setSliderValue: 100})
)
);;Reset(Slider1)
Best regards,
It does work, but now he's bouncing in all directions, and that makes sense
🤣😂😅
Hi @Frans_365CH ,
So have your issue been solved?
If my solution works for you, could you mark my answer as solution?
Thanks!
Best regards,
Ola,
No sorry it does not work cos, the slider is bouncing in all directions, at the end it will go to 0 or 100 but with a lot of trouble.
Thanks.
Hi @Frans_365CH ,
Maybe you could consider using a Timer to reset the slider to avoid the slider too quickly.
Try to set like this:
the slider's OnChange:
If(Slider1.Value <= 50;
UpdateContext({setSliderValue: 0});
If(Slider1.Value >= 50;
UpdateContext({setSliderValue: 100})
)
)
the slider's Default:
setSliderValue
Timer's settings:
AutoStart: true
Repeat: true
OnTimerEnd:
Reset(Slider1)
Duration:
1000
Best regards,
I've thought about that too, but I'm making some kind of drag and drop. I don't think that would be a solution.
More idea's 😊
Which is a little weird:
If I drag the slider from 100 to 80, nothing happens.
If I drag the slider from 100 to 30 it jumps to 0.
And vice versa
If I drag the slider from 0 to 30, nothing happens.
If I drag the slider from 0 to 80 it jumps to 100.
The event does not work within 0-50 and 50-100.
Can you do anything with that?
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
180 | |
137 | |
96 | |
83 |