Passing cfselects label to report builder

Discussion in 'Programming' started by pcastelli, Mar 13, 2008.

  1. #1
    I have a form that uses a cfselect which is used in a cold fusion report. Works like a charm. However in the heading of the report I want to let the user know what the selecton criteria was. I can pass the option part of the cfselect but that is just a key to the file and not meaningful to the end user. What I want to do is pass the text part of the select to the report but I can't figure out the syntax to do this.
    <cfselect name="Major_Key"
    id="Major_Key"
    bind="cfc:MajorMinor.getMajor()"
    value="Major_Key"
    display="Description"
    bindonload="true"
    />
    ...
    <cfscript>
    selection_string = "Major_Key = '#form.Major_Key.Description#' ";

    However, this doesn't work and I can't figure out what the right combo is. Do I have to reread the file using the key to get the description again?
     
    pcastelli, Mar 13, 2008 IP