How do you set a global variable to a boolean value? Currently in my app's OnStart property I have the following formula that is not working.
Set(VarChkC,false)
All of the documentation I can find shows how to set a GV to text or value. The documentation also mentions that a GV can be set to a boolean value, but I can't find any examples of how to do it.
The purpose of VarChkC is to set the status of a checkbox. Based on user selection, there are many ways the checkbox can be either true or false. Based on user selection, there are scenarios where VarChkC may never even come into play.
Solved! Go to Solution.
Hi @AGS94
What you have there is the correct syntax for setting a global variable to a boolean value.
If it's not working from your OnStart property, have you tried re-running your OnStart code through the menu link that's shown beneath?
Hi @AGS94
Set(VarChkC,false)
will create a variable of type boolean
You can check its type if you go to View tab -> variables > Global
To set it when checkbox is checked Set(VarChkC,true) using OnChecked method of checkbox
To set it when checkbox is unchecked Set(VarChkC,false) using OnUnChecked method of checkbox
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Hi @AGS94
What you have there is the correct syntax for setting a global variable to a boolean value.
If it's not working from your OnStart property, have you tried re-running your OnStart code through the menu link that's shown beneath?
Thanks for the guidance (I also was not aware of the "Run On Start").
I had the variable in three different locations and the others were setting it equal to a text value. I would have thought the OnStart would have forced it to boolean at least until the other Set functions were "engaged" so to speak, but apparantley not.
That said, I got it cleaned up such that all occurences are boolean. I now have a related issue that I will post in a new message since it is technically its own issue. Whew! Don't know why these seemingly simple boolean formulas are causing me so much problems!
Thanks again for the guidance.
User | Count |
---|---|
139 | |
132 | |
75 | |
72 | |
68 |
User | Count |
---|---|
213 | |
200 | |
64 | |
62 | |
54 |