CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Passing DB Column value to a Search page

Print topic Send  topic

Author Message
Doug
Posted: 04/10/2004, 2:44 PM

I have a Page with a 3 by 4 non-editable grid on our main page. The only visible columns are database driven Image file names. (call this Table 1) The actual controls in each column are image lnks.

I also have a different page with a Search control. After SUBMIT this retrieves the requested records (by selected category) and displays on a seperate grid page. (Table 2)

What I am trying to do is when the user clicks on one of the 12 pictures displaying in the home page grid (table 1), I want to pass the category (stored in another column in this table) to the search page (table 2) so it will automatically pull up a list of records matching that category. Is this possible ?

Thanks
Doug
srinivas

Posts: 54
Posted: 04/11/2004, 10:06 AM

You can use the IMAGE LINK and have the "category" as one of the parameters that gets passed on.

-Srinivas
View profile  Send private message
Doug
Posted: 04/11/2004, 10:10 AM

:-)
Srinivas,

Thanks for your reply. The columns are IMAGE LINKS already. It is HOW to pass the category on to the next page that I am not understanding how to do. (It needs to initiate the actual SEARCH form that exists on the destination page)

thanks
Doug
srinivas

Posts: 54
Posted: 04/11/2004, 10:20 AM

It is quite simple. In the Properties-Data sheet bring up the parameters for "Href Source". This may not be quite intuitive if you are new to CCS. Just select the source (such as mypage.ccp). Then you will see the ELLIPSIS (...) button to the right of thd property row. Click that button and it will bring up the HRef Source window where you can add the LINK Properties. Click on "+" button and add as one link-property at a time. That should do it.

-Srinivas
View profile  Send private message
Doug
Posted: 04/11/2004, 10:55 AM

Ok Thank you! I have done that. But on the DESITNATION page, which contains a grid that I want the search to automatically be peformed on, it is not including the Category field I am passing through the LINK PARAMETER to the SQL Clause. I placed this code on the destination page:
<cfoutput><br>SQL: #strSQL#</cfoutput>
<cfoutput><br>ORDER BY: #strOrder#</cfoutput>
<cfoutput><br>WHERE: #strWhere#</cfoutput>

It shows the complete SELECT statement, but the WHERE clause is blank. So the CATEGORY link parameter I am entering on the source page, is not passing this value correctly to the SQL Generator.

I will continue to research. Thank you again.
Doug
aradi

Posts: 66
Posted: 04/12/2004, 12:38 PM


In page1(main page) add a before show row Event and add the following:

$page1_Grid_name->Image_link_name->SetLink("page2_name.php?Category_id=".$page1_Grid_name->Category_id->GetValue());

In page2(Search page) search form, i assume you have Category_id as a field name to search on

Try that and see (PHP code)





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.