melvyn
Posts: 333
|
| Posted: 11/18/2008, 7:17 PM |
|
Maybe this is coincidence. Last night I got upset trying this thing, I got break and forget it. Today I read new post with the same thing, so this is my scenario:
1) Editable grid. Working. User must fill 2 fields. Third field is calculated from a parameter in URL.
2) If I get the parameter as default value, then always will fill the row with that default and 2 empty
3) If I set an event OnValidate then I can read the two values and set the third. In order to check/debug, I calculate the third and asign as $Component->my_value->SetValue($calculatedvalue), then echo and exit. The result says it's ok. I'm happy.
4) Database don't receive the value in the previous step, I don't understand why, because it get printed.
5) I also tried setting default value and custom code OnValidateRow to clear the calculated if the other are empty. echo and exit show it empty, database receive it.
6) I tried with theese events: OnValidate, OnValidateRow, OnValidateCalculatedField, ButtonSubmitOnClick, BeforeSubmit, BeforeInsert, BeforeExecuteInsert. All them shows the new value have been asigned; the new value never reach the database.
Why? Does somebody know some workaround to this.
Note:
This is same issue like me: http://forums.yessoftware.com/posts.php?post_id=99807
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
|