Alessandro
|
| Posted: 07/03/2002, 2:56 AM |
|
Hello, I use CC with PostgreSQL/PHP.
I've noticed a little problem with listbox capting values on tables with first record's serial id = 0.
If one sets a custom initial value in Field/Common properties, after submitting that value the listbox _showed_ value "jumps" to the one that has id=0 in the table. I try to explain better with an example. The listbox shows:
All
New
Awaiting Response
Closed-Resolved
Closed by User
[...]
In PostgreSQL table, New has id=0. If I submit 'All' value in the listbox, the select works good, but now the listbox shows 'New'.
This problem doesn't happen with listboxes working on table having no record with id=0;
Does anyone here experimented the same problem?
To solve it I had to change table structures and it was not very funny. Is there another more simple solution?
Regards,
Alessandro
|
|
|
 |
Nicole
|
| Posted: 07/05/2002, 1:58 AM |
|
Alessandro,
I suppose you should modify generated code a little to make it work as you want. Create Custom Show event for the form where listbox is used, and obtain generated code. You'll see that the listbox is fills from the array and the SELECTED option is assigned to the item where $key equals to the value of the primary key. In case there's no equal pare the Initial value become selected. Try to play around value comparison.
|
|
|
 |
|