This one is quite interesting. This could be something very trivial, but I would like to share this information.
I added a Checkbox on a Smartlist lookup using Modifier. Two functionalities with respect to this new checkbox:
1. This option should be selected by Default when we open the lookup.
2. Based on this value (selected/de-selected), the records should be refilled on the scrolling grid.
I was able to achieve the second one, by adding my code inside the validation in VBA:
If <WindowName>.<Checkbox>.Value = True Then
But for the first one, I tried the statement:
<WindowName>.<CheckBox>.Value = True
This never worked. I was quite confused, since the same statement worked on a validation but NOT WORKED on assignment. I checked back the VBA Manual and found that, for checkboxes we need to use either a number 1 (Select) or number 0 (De-select). So ideally, my statement should have been:
<WindowName>.<CheckBox>.Value = 1
Well, that did the trick and below is the conclusion:
To check whether a Checkbox is selected or not, you can write a code to check whether the value of that Checkbox is TRUE or FALSE. But, to select or de-select a Checkbox programmatically, you must assign either a number 1 or a number 0.