|
| Problem testing Result of checkbox |
| Iniciado por guest, 09,jun. 2015 14:08 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 09,junio 2015 - 14:08 |
Hello All,
I have a window with a checkbox that asks a question "Are Inventory Items Taxed?". When check box is checked (ticked), it is store as 1 (one), when unchecked, it is stored as 0 (zero). The field in the file is an integer field size 1. The field name is isinvtax. I used mysql.
When data in mysql field isinvtax is 1 (one) and I test for it like this;
If isinvtax=1 THEN info("One") ELSE info("Zero") END
I get Zero. I have checked over and over and cant seem to find what is wrong.
I will appreciate any help.
Sam |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,junio 2015 - 14:47 |
Hello Sam
Is it a multi question tickbox ? If so you will need to reference the subscript of the control question as If IsInvTax[1] = 1
regards Al |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,junio 2015 - 15:02 |
Hello Sam
you are not showing us the code that writes in the file... that may be it!
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,junio 2015 - 17:00 |
Hello Al,
I am using version 12 and its not a multi question checkbox. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,junio 2015 - 18:36 |
Hello Fabrice,
I am using version 12.
The saving bit is simple as below;
SWITCH Left(ExtractString(gsWindowMode,1,"="), // 'Creation' mode CASE "Creation" // Setup the record and save IF RADSave() THEN // Add the record HAdd(inventory) IF ErrorOccurred THEN Info("Unable to add record"+CR+HErrorInfo()) RETURN END
// Indicates that the form is no longer modified gsModifiedWindow = gsModifiedWindow OR MyWindow..Modified MyWindow..Modified=False
END // 'Modif' mode CASE "Modif" |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,junio 2015 - 21:28 |
Hi Sam
so it looks like you are setting the record fields values in RADSave, probably by a screenToFile... have you checked that the checkbox is correctly linked with the file item?
Best regards |
| |
| |
| | | |
|
| | | | |
| | |
|