I have a form with a checkbox. The checkbox does not save when leaving the form or changing records. After clicking the checkbox, I have tried… (1) hitting F6; (2) scripting a method that does a SaveData (3) moving from the selected record to another record and back again; (4) quiting Servoy and relaunching. In all cases the checkbox is unchecked when returning to the record. Data changes to text fields stick just fine. OS 10.3.2, rc8. (I checked this under rc6,7, and 8. same behavior.
what dataprovider is under the checkbox?
if you display that dataprovider in a textfield.. what for value do you see?
you used a global text dataprovider?
The behaviour of globals are changed. They always convert to the type you specfied.
i changed the textbox now (RC9) that it also takes a string (==“1” will select it)
Johan…your question gave me the answer. I displayed the dataprovider value in a field. It’s ‘1’ when checked. I was thinking the checkbox worked like Filemaker, where the associated text becomes the value. Redefined the checkbox dataprovider from ‘text’ to ‘integer’ and it works fine now. Just to be sure I’m understanding the way checkbox works, is this correct: (1) Non-global: If associated with a value list, checkbox options are the value list options and whichever ones are checked are stored as text values separated by newlines in the dataprovider field; (2) Non-global: If not[\b] associated with a value list, a checkbox returns an integer, 0 if not selected and 1 if selected; (3) Global: If not associated with a valuelist, a checkbox returns either an integer (0, 1) or text (‘0’, ‘1’) value, depending on the definition of the global.