Hi,
Do checkboxes have to be connected to a field in a datasource or can it function independently setting a variable to true or false?
Thanks a lot!
Regards,
Daniel
Solved! Go to Solution.
Hi Daniel,
A checkbox can either update a field in the data source as you mention, or you could use the OnCheck, OnUncheck and OnSelect properties to update a local variable to true/false
For example
Set OnCheck -
UpdateContext({LocalVar: true})
Set OnUncheck -
UpdateContext({LocalVar: false})
Thanks
Hi Daniel,
A checkbox can either update a field in the data source as you mention, or you could use the OnCheck, OnUncheck and OnSelect properties to update a local variable to true/false
For example
Set OnCheck -
UpdateContext({LocalVar: true})
Set OnUncheck -
UpdateContext({LocalVar: false})
Thanks
@Anonymous
Just as a follow on - You can simply refer to a checkbox to determine its value. You don't need to use consuming variables to determine a checkbox value.
ex. Checkbox1.Value will be either true or false when you reference it in your app. So, for example, if you have a TextInput and a Checkbox1 and you set the Visible of the TextInput to : Checkbox1.Value then the TextInput would only be visible when the checkbox is checked.
I hope this is helpful for you.
@SunnyB @RandyHayes Thanks for always helping to keep the forum active. Please keep up the good work.
User | Count |
---|---|
252 | |
106 | |
88 | |
51 | |
44 |