Solved

How do you pass 2 parameters in cfgridcolumn href?

Posted on 2010-09-13
11
582 Views
Last Modified: 2012-08-13
I can pass 1 value, I need to pass ACN & TDA_UIC

<cfgridcolumn name="ACN" header="ACN"  href="../MRE_ReqDetailOverviewgood_Update.cfm" hrefkey="TDA_UIC" select="false">

Then on resultspage.cfm I'm using #URL.CFGRIDKEY# to create link

Any help appreciated. - thanks.

<cfgridcolumn name="ACN" header="ACN"  href="../MRE_ReqDetailOverviewgood_Update.cfm" hrefkey="TDA_UIC" select="false">

Open in new window

0
Comment
Question by:Nigel-SA
  • 6
  • 5
11 Comments
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33662247
hey author,

i tried find somethng on net but unfortunate didnt found.
but i have 1 solution.....
in ur query make 1 column

ACN & '~' + TDA_UIC as LinkCOlumn

Pass this column in href.

While retriving value,use GetToken

<CFSET ACN = GetToken(GRIDKEY,1,"~")>
<CFSET TDA_UIC = GetToken(GRIDKEY,2,"~")>
0
 

Author Comment

by:Nigel-SA
ID: 33663224
Brichsoft - Thanks - I need some further guidance (novice)
in the query i get "keyword not found where expected"
none of these syntax's work, talking to oracle db:
MRE_PRIORITY_FY.TDA_UIC & '~' + MRE_PRIORITY_FY.ACN As LinkColumn,
(MRE_PRIORITY_FY.TDA_UIC) & '~' + (MRE_PRIORITY_FY.ACN) As LinkColumn,
((MRE_PRIORITY_FY.TDA_UIC) & '~' + (MRE_PRIORITY_FY.ACN)) As LinkColumn,
((MRE_PRIORITY_FY.TDA_UIC) and '~' + (MRE_PRIORITY_FY.ACN)) As LinkColumn,
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33663413

Oh....

Its my mistake...

Very sory nigel

this should work
MRE_PRIORITY_FY.TDA_UIC + '~' + MRE_PRIORITY_FY.ACN As LinkColumn,

or

check out this link as i'm not good in oracle.

http://www.codeguru.com/forum/showthread.php?t=307851


secondly, hope both columns are string
0
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 

Author Comment

by:Nigel-SA
ID: 33663490
:) I tried that as well. "invalid number ", both the fields are "CHAR"s

I'll check the second option - thanks
0
 
LVL 19

Accepted Solution

by:
Bhavesh Shah earned 500 total points
ID: 33663568

I got it. :-)

Select MRE_PRIORITY_FY.TDA_UIC || '~' || MRE_PRIORITY_FY.ACN As LinkColumn


0
 

Author Comment

by:Nigel-SA
ID: 33664522
Excellent - it works!  Almost there.
It passes the values toretrieve file with "Variable GRIDKEY is undefined." error - see http:
MRE_ReqDetailOverviewgood_Update.cfm?CFGRIDKEY=012009001~MCW07CAA00
I did as you suggested above:
<CFSET ACN = GetToken(GRIDKEY,1,"~")>
<CFSET TDA_UIC = GetToken(GRIDKEY,2,"~")>

Then in sql I did which does not seem correct:
WHERE MRE_REQUIREMENT.ACN ='#URL.GRIDKEY#'and MRE_REQUIREMENT.TDA_UIC = '#URL.GRIDKEY#'

Thanks for your help, this is huge for me...
0
 

Author Comment

by:Nigel-SA
ID: 33664621
:) Ok GRIDKEY needs to be CFGRIDKEY

Now, how does it distinguish the difference between CFGRIDKEY1 for ACN and CFGRIDKEY1 for TDA_UIC?

WHERE MRE_REQUIREMENT.ACN ='#URL.CFGRIDKEY#'and MRE_REQUIREMENT.TDA_UIC = '#URL.CFGRIDKEY#'
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33665425
WHERE MRE_REQUIREMENT.ACN ='#GetToken(URL.CFGRIDKEY,1,'~')#'and MRE_REQUIREMENT.TDA_UIC = '#GetToken(URL.CFGRIDKEY,2,'~')#'
0
 
LVL 19

Expert Comment

by:Bhavesh Shah
ID: 33665431

Hope this works.
0
 

Author Comment

by:Nigel-SA
ID: 33665488
Brichsoft, actually I just got this working because they're declare in the CFSET above...

WHERE MRE_REQUIREMENT.ACN ='#ACN#'and MRE_REQUIREMENT.TDA_UIC = '#TDA_UIC#'

Good job - thanks for your help
0
 

Author Closing Comment

by:Nigel-SA
ID: 33665506
Excellent support - thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question