CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Custom event example

Print topic Send  topic

Author Message
Jurjen Roels
Posted: 08/13/2002, 1:33 PM

Hi,

I am totally lost and i don't seem to have a good example.

My knowledge of object oriented programming is not that good.
Can somebody give an example in PHP on something easy describe below.


What should i declare in custom events when i want to do something like this:

I have a record set named products
4 fields: field1 field2 field3 field4 and a IDfield (parameter passed)

I want to have custom event coding (before update) where i do

$avariable = <value of field1>
$avariable2 = <value of field1> * IDfield
<field1> = $avariable2 //set the new value
<field2> = <field1>

Can somebody help me out?

Regards
Jurjen Roels

Ronb
Posted: 08/13/2002, 1:42 PM

global $formname;
$avariable=$formname->field1->Value;
$avariable2=$avariable * $formname->IDfield->Value;
$formname->field1->setvalue($avariable2);
$formname->field2=>setvalue($avariable2);

I have no idea what this would be good for but this is literaly what you wrote above. If you ment to do this only where field1 is equal to field to the thing would look quite differently.

If you're dutch please restate your request in dutch maybe it would become a little clearer what it is you want :-)
Jurjen Roels
Posted: 08/14/2002, 12:09 AM

No it is just to understand that a simple example. Does not have to mean anything...

I am doing something wrong else where and i don't seem to get it...

These examples sometimes help.

And yes i am dutch

Regards
Jurjen
Nicole
Posted: 08/14/2002, 2:45 AM

Jurjen,
use code like below in form Before Show Row event:
global $form_name;
$form_name->field1->SetValue($form_name->field1->Value * CCGetParam("param_name", ""));
$form_name->field2->SetValue($form_name->field1->Value);

   


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

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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