Solved

How do you pass 2 parameters in cfgridcolumn href?

Posted on 2010-09-13
11
574 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
 

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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now