Topic: Using the CheckBox

Hello everyone and thanks for your interest. I tried to use two CheckBoxes but evidently I understood little or nothing.
What are the problems?

1) If I tick one of the two CjeckBox 'Yes or No' it also ticks the other users. For example, if I check YES for a user, YES will also be given to the other users, if for any user I then check NO, all the other users will also become NO.

2) When I close the program then at the next start there is no longer a check on NO or YES

Thanks to all and greetings.

Post's attachments

Attachment icon Check.zip 323.32 kb, 84 downloads since 2023-04-20 

Re: Using the CheckBox

Hi Fabio,
You are misunderstanding how boolean fields and checkboxes should be used.
In very simple terms:
1.  when you define a field as boolean, the field name you give it might typically describe the question that you are wanting a 'yes' or 'no' answer to;  for example - married? smoker? qualified? etc etc would all be discrete fields that you would define as boolean in your data schema.
2.  you would be extremely unlikely to hold these responses in a related table - you would just hold them on the main table.
Have a look at the attached as an example of how the sort of questions you would ask might be configured as boolean fields in your data schema and how to use them on your forms.
Derek.

Post's attachments

Attachment icon Check.zip 336.19 kb, 115 downloads since 2023-04-21 

Re: Using the CheckBox

Hi Derek, thanks for the usual explanations, I understood that I didn't understand correctly, but now it's clear to me how to do it. A thousand thanks!

Re: Using the CheckBox

Hi derek, would there be a way to translate the two yes/no values?
Thank you!

Re: Using the CheckBox

Try putting this at the very end of your script.

begin
  translate('Yes','Si');
  translate('No','Non');
end.

Derek.

Re: Using the CheckBox

Great Derek, it works! I thought it was more complicated but I realized that with 'Translate' you can translate anything no matter where it is (field, control etc.)
A thousand thanks.

Re: Using the CheckBox

Hello Derek, Reteinformatica

Attention, all the possible and imaginable messages that you could find have not been integrated into MVD and therefore for some, you will not be able to apply a translation.
JB

Re: Using the CheckBox

Hi Jean.Brezhonek, thanks for the information. Luckily, up to now I've managed to translate everything I wanted. In any case I understood that just try with the "Translate" statement in any case.