CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 set value based on another field

Print topic Send  topic

Author Message
knackje

Posts: 30
Posted: 06/25/2007, 1:16 AM

Hi all,

I'm a newbie with php, and have a question how to code the following problem:

In an editeble grid, how to:

set a value based on another field like the example below

colum1: integer
cloum2: integer
colum3: integer

if (column1 - column2) = 40 then column3 = 1
else 0

tnx in advanced, hope someone can help me with this.


View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 06/25/2007, 2:45 PM

knackje
Here is a example from the CCS example pack. Maybe it can help you: http://examples.codecharge.com/CCSExamplePack2/Dependen...entListBox3.php
View profile  Send private message
knackje

Posts: 30
Posted: 06/25/2007, 10:51 PM

hi mambobrown

tnx fot helping! I read the example, but it is not exact what i mean. The expression in de example is hard coded. I shall explain my thinking, with an other example:

Example:

table1: year, start_money, first_pay, second_pay, third_pay
table2: year, min_payment --> exaple values (2007, 40)

Datagrid1:

datasource: table 1

table1.textbox1: start_money
table1.textbox2: first_pay
table1.textbox3: second_pay
checbox1: depends!

checkbox1: checked or not, depends on the total amount of money of the first and second payment. It must be more then table2.min_payment. So in this example more then 40.

So i was thinking somithing like the following code:

----------------------------------------------------------
in the before shown event:

if
(table1.textbox1 + table1.textbox2) > select max(year), min_payment from table2

then grid1.checkbox1 = 1

end if
-----------------------------------------------------


Hope you or maybe someelse can help me with this. tnx in advanced.

View profile  Send private message
knackje

Posts: 30
Posted: 07/03/2007, 12:02 AM

Can anyone help me?

tnx...
View profile  Send private message

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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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