CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> CodeCharge -> Programming

 Linking two records

Print topic Send  topic

Author Message
Scotty

Posts: 20
Posted: 01/18/2005, 1:42 AM

Hi,

On one PHP page, I've got three different section:
1. Search
2. Search Results
3. Update/Delete of record selected from search result

The search results, include a HTML link on the unique key. The user can then select this link to bring up the update/delete section of the page, with the details of the record obtained from the unique key. Whilst the update/delete section is displayed the value of the unique key (which the user selected) has been lost and as a result, no values have been defaulted. When the user holds the mouse the link field in the search results, the browser correctly displays the link (in the bottom left).

I cant see what options I need to set in codecharge to ensure that the element keeps the unique key value that the user has selected. I cant see what causes this field to be 'lost'.

I've set up the SQL for the update/delete section to use the field which holds the unique key obtained search results. It has also been set to "GET"

This is probably something quite straight forward, but I'm new to CodeCharge...

Thanks, Scotty
View profile  Send private message
Nicole

Posts: 586
Posted: 01/19/2005, 4:54 AM

Scotty,
In order to preserve search results, page number and sort order of a grid form you need to pass corresponding parameters to a Record form and then back to a grid. To do it, please follow the steps:
1. to preserve search parameters open Properties->Input window of a grid form and mark all parameters as Transfer;

2. store sort order and page number into Session in Open event of a Grid form. Here is a sample code, you need to use real form name instead of <FormName> keyword. This is ASP example
  
Session("Form<Form_name>_Sorting") = GetParam("Form<Form_name>_Sorting")  
Session("Form<Form_name>_Page") = GetParam("Form<Form_name>_Page")  

3. under Input properties of a Record form add the same search parameter as for the grid form and mark them as Transfer as well.

4. create Before Insert, Update, Delete and Cancel events where create a parameter string that passes sort order and page number back to the grid. The code is the same for all events
  
sParams = sParams  & "&Form<FormName>_Sorting=" & Session("Form<FormName>_Sorting")&"&Form<FormName>_Page="& Session("Form<FormName>_Page")  


_________________
Regards,
Nicole
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.