Except for the cfif line, Billy is right.  The cfif needs to conform 
to the
same order of operations he mentioned:

<cfif decisionID EQ thisDecisionID>selected</cfif>

All that is needed is decisionID, since it is used implicitly within 
the
current query.

If you wanted to keep the query name for the sake of the clarity of t
he
code, you could also do:

<cfif getDCodes.decisionID[CurrentRow] EQ thisDecisionID>selected</cf
if>

> -----Original Message-----
> From: Billy Cravens [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 08, 2002 2:37 PM
> To: CF-Talk
> Subject: Re: problem with dynamic data in my select boxes
>
>
> When you start iterating through your inner query, it "loses its pl
ace" in
> the first query - meaning, referencing a column from the outtermost
 query
> and expecting it to know what row it is on.  Like referencing query
column
> outside of a query loop, it defaults to the first row's value.  You
 should
> save the column value in a local variable before entering the inner
 query
> loop:
>
> <cfset thisDecisionID = getReviewers.decisionID>
> <CFLOOP query="getDCodes">
>           <option value="#decID#"
>             <CFIF getDCodes.decisionID EQ
>             thisDecisionID>selected</cfif>
>
>
> ----- Original Message -----
> From: "Tammy Hong" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 08, 2002 12:52 PM
> Subject: problem with dynamic data in my select boxes
>
>
> > Hi everyone,
> >
> > Can someone please point to me what the problem here is? I
> basically have
> > two queries. One pulls out the record set for a particular ID
> number  and
> is
> > grouped in a cfoutput based on another ID number. The problem
> is that when
> I
> > have more than one dynamically populated select box with the HTML
 below,
> the
> > ID that is selected is not the right one. It will select the firs
t
> > decID of the first reviewer that is outputted. I am sure this
> is the right
> > way to reference the variables. Can someone point me to the incor
rect
> logic?
> > Please! I'm about to pull my hair out.
> >
> >
> > See below:
> > <CFOUTPUT query="getReviewers" group="reviewerID">
> > <select name="decID">
> >   <option value="0">[Select a decision]</option>
> >      <CFLOOP query="getDCodes">
> >          <option value="#decID#" <CFIF getDCodes.decisionID EQ
> > getReviewers.decisionID>selected</cfif>
> > >#trim(decisionDescription)#</option>
> >      </CFLOOP>
> > </select>
> > </CFOUTPUT>
> >
> > Tammy
> >
> ___________________________________________________________________
___
> Dedicated Windows 2000 Server
>   PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
>   Instant Activation · $99/Month · Free Setup
>   http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to