Link to PDF using cfgridcolumn and href using hrefkey

Posted on 2011-05-12
Last Modified: 2012-05-11

Trying to call a PDF in a directory which is the same name in table.  The ECN variable does not have the .pdf extension included so I need to add it to be able to link it and view it.  So the ???? needs to be variable ECN plus".pdf" - hope this makes sense?

<cfgrid format="html"...>
      <cfgridcolumn name="ECN"  header="PDF" width="55" href="MainHist/????" target="_blank" display="yes" hrefkey="ECN" select="false"/>

So if I run this by clicking on ECN 005252 the url looks likes this:


Thanks for your help

Question by:Nigel-SA
    LVL 2

    Accepted Solution

    <cfset fileName = "#ECN#.pdf">

    And point the link to the pdf folder.


    Author Comment

    nmarano - thanks - almost there. How do I cfset a variable that is within a query?

    <cfquery name="xxxx" datasource="yyy">
                       SELECT  ECN, TARA_ID
                        FROM MRE_TARA_LIST

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    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 …
    Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them ( . I did keep the main js functions but made sever…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    734 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

    22 Experts available now in Live!

    Get 1:1 Help Now