CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Retrieve Value for Control

Print topic Send  topic

Author Message
bigtoe

Posts: 115
Posted: 10/23/2004, 7:02 PM


I used CCS to create 2 forms.
FormOne allows me to create a new record or edit/view an existing record.
FormTwo allows me to search and list existing records.

When I see the (grid) listing of records in FormTwo, I can select a record by clicking on its link.
When this record's link is clicked, I am redirected to FormOne with this record's primary key.
So in FormOne I can now edit or view the details of this existing record.

This means that FormOne can be called with:

the basic URL
http://therespectivepage.com/FormOne.php

OR

basic URL with and primary key
http://therespectivepage.com/FormOne.php?TABLE_V_PRIM_KEY=2

So far all this works just fine - as expected.

Now I want to redirect the user to FormOne from another page called FormThree.
In FormThree, I have 2 fields called name and age.
I am passing name and age to FormOne:
http://therespectivepage.com/FormOne.php?name=jack&age=29

To receive the name and age in FormOne, I have made these changes:

For name, Server-Before Show-Retrieve Value for Control
Control Name: FormOne_name
Source Type: Expression
Source Name: CCGetParam("name","")

For age, Server-Before Show-Retrieve Value for Control
Control Name: FormOne_age
Source Type: Expression
Source Name: CCGetParam("age","")

This works fine when I redirect the user from FormThree to FormOne.

But now the problem is:

I see the (grid) listing of records in FormTwo, I select a record by clicking on its link.
When this record's link is clicked, I am redirected to FormOne with this record's primary key.
In FormOne the rest of the fields are fine except for the name and age.
The name and age fields are empty because the URL
http://therespectivepage.com/FormOne.php?TABLE_V_PRIM_KEY=2
does not contain these 2 parameters.
Therefore, the Retrieve Value for Control gets no data for these 2 fields.

So the question is how can I fix this problem so that when FormOne is called:

http://therespectivepage.com/FormOne.php
With no parameters, then each field is initialized to its default setting

AND

http://therespectivepage.com/FormOne.php?TABLE_V_PRIM_KEY=2
With the record's primary key parameter,
all the fields in FormOne are loaded from the database.
(including the name and age fields)

AND

http://therespectivepage.com/FormOne.php?name=jack&age=29
With the name and age parameters,
the name field gets the data value "jack"
the age field gets the data value "29"
the remaining fields are initialized to their respective default settings


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.

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.