From: Paboo on
How can I create a URL in href for each record where the query parameters are
the values of the selected record.
I tried the following:
<cfgrid name="mygrid" query="getproducts">
<cfgridcolumn name="prod" href="#order_url#?prod=#getproducts.product#"
hrefkey="product">
</cfgrid>

The problem with this is, no matter what product I selected, it will still
pass the first record in the table.


From: tzimmerman on
Try the following:
<cfgrid name="mygrid" query="getproducts">
<cfgridcolumn name="prod" href="#order_url# hrefkey="product">
</cfgrid>

When you click on the href link it will pass the value of the product in
CFGRIDKEY. See "Using the href attribute" in
http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhel
p.htm?context=ColdFusion_Documentation&file=00000266.htm.

Then when you do your where clause on your linked page it will be WHERE
PRODUCT=#URL.CFGRIDKEY#.

Ted Zimmerman



From: PikesPeakPam on
I am trying to do something similar - I want the user to be able to navigate to
a non-cfm page to do an employee lookup from a corporate ldap using a list of
employees in a cfgrid. How can I get this to work?
The search string should look like this (assuming 1111 is the employee
number):
http://myhome.com/employee_lookup?Search=1111

Here is my code so far:
<cfgrid name="mygrid" query="get_employees">
<cfgridcolumn name="staff_id_nbr"
href="http://myhome.com/employee_lookup?Search=#get_employees.staff_id_nbr#"
target="_blank" >
</cfgrid>

This is the result (displays the employee info, but adds too much info to the
address):

http://myhome.com/employee_lookup?Search1111&CFGRIDKEY=1111%2CAblay%2CMaria%2CSr
+Technical+Analyst%2CCompanyx+Services%2C111-484-2477%2CJean%2CKimberly+McFadden
-Effinger%2CUrsula+Steele%2CScot+Struminger%2CEric+Keane%2CRMTC%2CWN%2C243%2C%2C
maria.ablay%40company.com%2C%2C

How do I get rid of all the garbage, starting with &CFGRIDKEY? Some of it is
Employee LDAP info, but I'm most concerned about the &CFGRIDKEY=1111. I tried
using the hrefkey in various ways, but luck. Thanks...


 | 
Pages: 1
Prev: Verity Search Error
Next: Mail Spool One at a Time