Re: problem with dynamic data in my select boxes

2002-01-08 Thread Billy Cravens

When you start iterating through your inner query, it loses its place 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
thisDecisionIDselected/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 first
 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 incorrect
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.decisionIDselected/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



RE: problem with dynamic data in my select boxes

2002-01-08 Thread Andrew Tyrone

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

cfif decisionID EQ thisDecisionIDselected/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 thisDecisionIDselected/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
 thisDecisionIDselected/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.decisionIDselected/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



Re: problem with dynamic data in my select boxes

2002-01-08 Thread Douglas Brown

This is how I handle this


cfset thisDecisionID = getReviewers.decisionID
CFLOOP query=getDCodes
CFIF getDCodes.decisionID EQ thisDecisionID
CFSET select = SELECTED
/CFIF  
option value=#decID# #select#




There are two major products that come out of Berkeley: LSD and [Unix] 
BSD. We don't believe this to be a coincidence.



Doug Brown
- Original Message - 
From: Billy Cravens [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 11:37 AM
Subject: Re: problem with dynamic data in my select boxes


 When you start iterating through your inner query, it loses its 
place 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
 thisDecisionIDselected/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 first
  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 
incorrect
 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.decisionIDselected/cfif
  #trim(decisionDescription)#/option
   /CFLOOP
  /select
  /CFOUTPUT
 
  Tammy
  
 
__
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



RE: problem with dynamic data in my select boxes

2002-01-08 Thread Raymond Camden

Errr, won't this mean that every value AFTER the correct one will also
be marked selected? Sure the browser will use the first one, but that
i'snt good. I'd add a cfset select =  before the cfif.

-Raymond

 cfset thisDecisionID = getReviewers.decisionID
 CFLOOP query=getDCodes
 CFIF getDCodes.decisionID EQ thisDecisionID
 CFSET select = SELECTED
 /CFIF  
 option value=#decID# #select#
 
 
 
 
 There are two major products that come out of Berkeley: LSD 
 and [Unix] 
 BSD. We don't believe this to be a coincidence.
 
 
 
 Doug Brown
 - Original Message - 
 From: Billy Cravens [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Tuesday, January 08, 2002 11:37 AM
 Subject: Re: problem with dynamic data in my select boxes
 
 
  When you start iterating through your inner query, it loses its 
 place 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
  thisDecisionIDselected/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 first
   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 
 incorrect
  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.decisionIDselected/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



RE: problem with dynamic data in my select boxes

2002-01-08 Thread Tammy Hong

Hi,

Thank you all for your valuable input. It worked perfectly. Have a nice d
ay.

Tammy

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 08, 2002 2:18 PM
To: CF-Talk
Subject: RE: problem with dynamic data in my select boxes


Errr, won't this mean that every value AFTER the correct one will also
be marked selected? Sure the browser will use the first one, but that
i'snt good. I'd add a cfset select =  before the cfif.

-Raymond

 cfset thisDecisionID = getReviewers.decisionID
 CFLOOP query=getDCodes
 CFIF getDCodes.decisionID EQ thisDecisionID
 CFSET select = SELECTED
 /CFIF
 option value=#decID# #select#




 There are two major products that come out of Berkeley: LSD
 and [Unix]
 BSD. We don't believe this to be a coincidence.



 Doug Brown
 - Original Message -
 From: Billy Cravens [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Tuesday, January 08, 2002 11:37 AM
 Subject: Re: problem with dynamic data in my select boxes


  When you start iterating through your inner query, it loses its
 place 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
  thisDecisionIDselected/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 first
   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
 incorrect
  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.decisionIDselected/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



Re: problem with dynamic data in my select boxes

2002-01-08 Thread Douglas Brown

Yeah I forgot to stick that in there. Woops



There are two major products that come out of Berkeley: LSD and [Unix] 
BSD. We don't believe this to be a coincidence.



Doug Brown
- Original Message - 
From: Raymond Camden [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 12:17 PM
Subject: RE: problem with dynamic data in my select boxes


 Errr, won't this mean that every value AFTER the correct one will also
 be marked selected? Sure the browser will use the first one, but that
 i'snt good. I'd add a cfset select =  before the cfif.
 
 -Raymond
 
  cfset thisDecisionID = getReviewers.decisionID
  CFLOOP query=getDCodes
  CFIF getDCodes.decisionID EQ thisDecisionID
  CFSET select = SELECTED
  /CFIF  
  option value=#decID# #select#
  
  
  
  
  There are two major products that come out of Berkeley: LSD 
  and [Unix] 
  BSD. We don't believe this to be a coincidence.
  
  
  
  Doug Brown
  - Original Message - 
  From: Billy Cravens [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Tuesday, January 08, 2002 11:37 AM
  Subject: Re: problem with dynamic data in my select boxes
  
  
   When you start iterating through your inner query, it loses its 
  place 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
   thisDecisionIDselected/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 
first
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 
  incorrect
   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.decisionIDselected/cfif
#trim(decisionDescription)#/option
 /CFLOOP
/select
/CFOUTPUT
   
Tammy

   
  
 
__
Why Share?
  Dedicated Win 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=coldfusionc
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



Re: problem with dynamic data in my select boxes

2002-01-08 Thread Douglas Brown

Should have been like so..

cfset thisDecisionID = getReviewers.decisionID
CFLOOP query=getDCodes
CFIF getDCodes.decisionID EQ thisDecisionID
CFSET select = SELECTED
CFELSE
CFSET select = 
/CFIF  
option value=#decID# #select#



There are two major products that come out of Berkeley: LSD and [Unix] 
BSD. We don't believe this to be a coincidence.



Doug Brown
- Original Message - 
From: Raymond Camden [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 12:17 PM
Subject: RE: problem with dynamic data in my select boxes


 Errr, won't this mean that every value AFTER the correct one will also
 be marked selected? Sure the browser will use the first one, but that
 i'snt good. I'd add a cfset select =  before the cfif.
 
 -Raymond
 
  cfset thisDecisionID = getReviewers.decisionID
  CFLOOP query=getDCodes
  CFIF getDCodes.decisionID EQ thisDecisionID
  CFSET select = SELECTED
  /CFIF  
  option value=#decID# #select#
  
  
  
  
  There are two major products that come out of Berkeley: LSD 
  and [Unix] 
  BSD. We don't believe this to be a coincidence.
  
  
  
  Doug Brown
  - Original Message - 
  From: Billy Cravens [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Tuesday, January 08, 2002 11:37 AM
  Subject: Re: problem with dynamic data in my select boxes
  
  
   When you start iterating through your inner query, it loses its 
  place 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
   thisDecisionIDselected/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 
first
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 
  incorrect
   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.decisionIDselected/cfif
#trim(decisionDescription)#/option
 /CFLOOP
/select
/CFOUTPUT
   
Tammy

   
  
 
__
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



Re: problem with dynamic data in my select boxes

2002-01-08 Thread Douglas Brown

Man I am t tired. I meant to say

cfset thisDecisionID = getReviewers.decisionID
CFLOOP query=getDCodes
CFIF getDCodes.decisionID EQ thisDecisionID
CFSET select = SELECTED
CFELSE
CFSET select =  
 option value=#decID# #select#
/CFIF 


There are two major products that come out of Berkeley: LSD and [Unix] 
BSD. We don't believe this to be a coincidence.



Doug Brown
- Original Message - 
From: Douglas Brown [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 7:35 PM
Subject: Re: problem with dynamic data in my select boxes


 Should have been like so..
 
 cfset thisDecisionID = getReviewers.decisionID
 CFLOOP query=getDCodes
 CFIF getDCodes.decisionID EQ thisDecisionID
 CFSET select = SELECTED
 CFELSE
 CFSET select = 
 /CFIF  
 option value=#decID# #select#
 
 
 
 There are two major products that come out of Berkeley: LSD and [Unix] 

 BSD. We don't believe this to be a coincidence.
 
 
 
 Doug Brown
 - Original Message - 
 From: Raymond Camden [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Tuesday, January 08, 2002 12:17 PM
 Subject: RE: problem with dynamic data in my select boxes
 
 
  Errr, won't this mean that every value AFTER the correct one will 
also
  be marked selected? Sure the browser will use the first one, but 
that
  i'snt good. I'd add a cfset select =  before the cfif.
  
  -Raymond
  
   cfset thisDecisionID = getReviewers.decisionID
   CFLOOP query=getDCodes
   CFIF getDCodes.decisionID EQ thisDecisionID
   CFSET select = SELECTED
   /CFIF  
   option value=#decID# #select#
   
   
   
   
   There are two major products that come out of Berkeley: LSD 
   and [Unix] 
   BSD. We don't believe this to be a coincidence.
   
   
   
   Doug Brown
   - Original Message - 
   From: Billy Cravens [EMAIL PROTECTED]
   To: CF-Talk [EMAIL PROTECTED]
   Sent: Tuesday, January 08, 2002 11:37 AM
   Subject: Re: problem with dynamic data in my select boxes
   
   
When you start iterating through your inner query, it loses its 

   place 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
thisDecisionIDselected/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 
 first
 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 
   incorrect
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.decisionIDselected/cfif
 #trim(decisionDescription)#/option
  /CFLOOP
 /select
 /CFOUTPUT

 Tammy
 

   
  
 
__
Why Share?
  Dedicated Win 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=coldfusionc
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