This topic is locked

How to validate textbox values,how make calculated values and how to s

4/11/2007 9:31:50 PM
PHPRunner General questions
V
vrpotluri author

Hi,

I'm to new to PHPRunner.

  1. I have three fields or text boxes order_qty, price and totalval I want totalval = order_qty * price how can I do this.
  2. I have two fields or text boxes order_qty,Avilable_qty how can I validate Avilable_qty > order_Qty how can I do this.
  3. Once the order is executed prevent the user to edit delete the master or detail records they can only view how can I do this.
    Some one please answer these ASAP
    In advance thanks for the help

J
Jane 4/12/2007

Hi,
all these tasks can be accomplished using events on the Events tab.

For example to calculate totalval use following code in the Before record added event:

$values["totalval"]= $values["order_qty"] * $values["price"];


You can find some examples of code in the PHPRunner Help and Livedemos:

http://www.xlinesoft.com/phprunner/docs/

http://www.xlinesoft.com/phprunner/livedemo4.htm

or on the PHPRunner forum.

D
dcrera 4/24/2007

Hi Jane,
I tried this solution and
On the Sql select statement I have
select order_qty, price, order_qty * price as totalval ...
I set totalval as a ReadOnly.
When I try to update the record I get the following message
ociexecute() [function.ociexecute]: ORA-00904: "TOTALVAL": invalid identifier
Thanks

Hi,

all these tasks can be accomplished using events on the Events tab.

For example to calculate totalval use following code in the Before record added event:
You can find some examples of code in the PHPRunner Help and Livedemos:

http://www.xlinesoft.com/phprunner/docs/

http://www.xlinesoft.com/phprunner/livedemo4.htm

or on the PHPRunner forum.

J
Jane 4/25/2007

Hi,
you need to remove totalval field from the Add and Edit pages.