: Keith WHITE
It looks like a dynamic variable based checkbox is always a longint.
What did you expected? Many years ago it was only Boolean, for some versions now by default numeric.
A check box can have (up to) 3 values. Clicked. Not clicked. Undefined.
0, 1 or 2.
When the user clicks the object, the box is checked. When a check box is checked, it has the value 1. When it is not checked, it has the value 0.
This property is only available for standard check boxes associated with numeric variables — 3D check boxes and check boxes for Boolean fields cannot use the Three-States property (a Boolean field cannot be in an intermediary state).
The variable associated with the check box returns the value 2 when the check box is in the third state.
BTW, with 4D v17, I stopped using dynamic variables.
They was great to avoid process variables, but they was not comfortable to use, always requiring code to use pointers, more difficult to read.
Starting with v17 using Form.mycheckbox is so much easier.
See Form as a kind of form variable.