amc
Posts: 22
|
Posted: 03/08/2013, 6:13 PM |
|
Hi,
In a Record form, I have a ListBox with 3 possible values: 0 = "NO", 1 = "YES", 2 = "AUTO".
In one table of the database, I have a Boolean field that can be NULL (NO = FALSE, YES=TRUE, AUTO=NULL).
I managed to show AUTO in the ListBox when the field is NULL, working in the BeforeShow event of the ListBox.
But when I want to update (submit) the record I can't find the method to insert NULL, in the case the ListBox value is 2 (AUTO).
Thanks for your help!
|
|
|
ckroon
Posts: 869
|
Posted: 03/18/2013, 2:55 AM |
|
In the on validate event of the form
If( whatever)
{
$component->ListBox1->SetValue("");
}
_________________
Walter Kempees...you are dearly missed. |
|
|
amc
Posts: 22
|
Posted: 03/19/2013, 10:22 PM |
|
Hi,
this code saves 0 to the DB, I want to save NULL.
|
|
|
ckroon
Posts: 869
|
Posted: 03/20/2013, 1:44 AM |
|
What is the default value for that field in your DB table.. set it to NULL
_________________
Walter Kempees...you are dearly missed. |
|
|
|