Fields formatted with a group of check boxes store their values in the order the corresponding check box was clicked, separated by return characters.
Set Field [YourTable::CheckboxField ; 1 ]
will clear all previously selected values and select the checkbox for the value 1.
Set Field [YourTable::CheckboxField ; List ( YourTable::CheckboxField ; 1 ) ]
will select the checkbox for 1 without clearing previously selected values.
But you could use a calculation for this instead of a script:
List ( If ( Not IsEmpty ( Field A ) ; 1 ) ; If ( Not IsEmpty ( Field B ) ; 2 ) ; If ( Not Is Empty ( Field C ) ; 3 ) )
This combines the values 1, 2 and 3 in a list if the corresponding fields are not empty.
Your check box formatted field can be defined as a calculation field that returns text or you can assign this calculaiton to a text field so that the above expression auto-enters the data.
Once again You have proved to be extremely helpful!
Thank You so much!