CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 On validate event problem

Print topic Send  topic

Author Message
Tony
Posted: 12/28/2004, 1:41 AM

Using Order Entry example I have a little problem:
I try to use the following example code in OnValidate event in editable grid, but I can get a value:
if ( $store_orders_items->price->GetValue() > x) {
.....
}

I allways can not get any value here.
Any idea on that haw can I get any value?

Tony
klw
Posted: 12/28/2004, 1:02 PM

Show us your entire code for OnValidate ...

Did you define '$store_orders_items' as global.

Quote Tony:
Using Order Entry example I have a little problem:
I try to use the following example code in OnValidate event in editable grid, but I can get a value:
if ( $store_orders_items->price->GetValue() > x) {
.....
}

I allways can not get any value here.
Any idea on that haw can I get any value?

Tony
Tony
Posted: 12/29/2004, 12:41 AM

Of course:
--------------------------------------------
function store_orders_items_OnValidate()
{
$store_orders_items_OnValidate = true;
//End store_orders_items_OnValidate

//Custom Code @119-D121A1BD
// -------------------------
global $store_orders_items;
// Write your own code here.
// -------------------------
if ( $store_orders_items->price->GetValue() > 20) {
........
$store_orders_items->Errors->addError("My Error");
}
//End Custom Code

//Close store_orders_items_OnValidate @77-8A530159
return $store_orders_items_OnValidate;
}
------------------------------------
I have resolved the problem, but it seems that in this case CC can not get values.
My solution is:
I have defined my own function at end of event file and I call It in Validation Rule of price field with appropriate error text.
I do not known if this is a bug or not.

Tony

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.