kburnett
|
Posted: 04/23/2003, 4:39 PM |
|
i have posted this before (to no avail) but it's worth another shot.
according to documentation, you can alter a $form->$field value in a "before build update" method.
so in that method you have:
$global $formname;
$formname->fieldname->SetValue("whatever");
// just to test the change
echo $formname->fieldname->GetValue();
sound good so far?
well, function update(), the ccs-generate code that calls the before build update method doesn't think so.
in fact, from the function update i can add some print statements to test it and guess what... no change.
anyone have any advice for me? i really do prefer to do this the right way, but i am running out of time and will wind up hacking it i can't solve this.
thoughts?
thanks.
|
|
|
bryan
|
Posted: 08/28/2003, 12:31 PM |
|
Instead of:
$formname->fieldname->SetValue("whatever");
Try
$formname->ds->fieldname->SetValue("whatever");
|
|
|
glerma
|
Posted: 08/30/2003, 12:09 PM |
|
This may be because of when you are trying to change the value. The key may lie in when you change the value.
POSSIBLE CAUSE:
It is possible that you are setting the custom value BEFORE the CCS Code is setting the value. The Set value function will be called by CCS before any update in order to set any NEW value that may have changed from the original one. In other words, after you set your custom value, CCS then overwrites it with it's value.
PROPOSED SOLUTION:
Try moving the Custom Code to another "Event", such as Before Update or Before Execute Update and see if it helps out.
|
|
|
|