Since the text input and slider control values derive their values from the dataValue variable, adapting this to work on a Form is a case of initialising the dataValue to the target value.
Your app presumably contains some control to load the record that's shown on the form - eg, a button or the OnSelect of a gallery. You would initialise the variable in the same place.
THIS solution has a serious FLAW: it CAN'T remember any PREVIOUS state of the control 😮
REASON:
NONE of your formulae (for the Default or OnChange values of either control) make ANY reference to Parent.Default :-?
SO...
This solution might work here & now on a form... but once you SAVE that data and then later try to RETRIEVE IT...
... NONE of the PREVIOUS values would be retrieved 😮
WORKING on a solution which checks for any Parent.Default values, and will post shortly (I hope)...
-Mark in North Aurora
Hi jchicky,
It's possible by setting up a few things:
The only slight drawback to this approach is when you go to click in the text box to input your number, you are forced to click twice as the visible property goes through the change over and the text input box takes the second click. I couldn't see any other property in the slider control (like a trigger when the mouse button or finger tap is released from the screen... like an OnRelease event or something, so this is the best cleanest alternative I can come up with)...
Hmmm... maybe we can request that be added to the properties of the slider control: OnPress and OnRelease behaviors to trigger something else. Then we can update the context of the visible properties and have the best of all worlds. You could then be clicking or tapping in the text box on the first click or tap.
Hope that makes sense and helps out.
Russ
Yes you did the right thing. I didn't notice that. Thanks for pointing that out 😉
No worries. I like your idea of using a rule to highlight the control by the way.
Just to clarify for anyone reading this, the slider control will coerce the value down on second, and subsequent occasions.
The main purpose of my post was just to address the requirement to update the input box based on the slider value:
If the user moves the slider, the input box updates to show the number that the slider is on.
My appology.. It works that way. Just tryied that
Not a good way of doing it.. The error is fixed only once. If you enter wrong value second time it won't fix it. It might be a bug therefore I rather prefer to secure it with a code if I want to do it that way
To make an error message in this example change the texbox border colour to red is to set rules
See image
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional