Nature of the beast.
 
Try this:
 

<td align="left">
       <select name="StatusID_#TaskID#">
              <cfloop query="getStatusRet">
                      <cfset thisID = getStatusRet.Status_ID>
                                <option value="#thisID#" <cfif 
getTimeLinesRet.Status_ID EQ this_ID>Selected</cfif>>#Status#</option>
                            </cfloop>
                        </select>
                    </td>


________________________________

From: Bruce Sorge [mailto:[EMAIL PROTECTED]
Sent: Tue 3/13/2007 11:59 AM
To: CF-Talk
Subject: Why is this not working



I have a select list that is embedded into an output query, and the select
list is using CFLOOP with the query attribute to generate the list. Of
course on the update I want the select list to select the record that
matches in the database, but it is not. Using the standard CFIF statement
like this:

<td align="left">
                        <select name="StatusID_#TaskID#">
                            <cfloop query="getStatusRet">
                                <option value="#Status_ID#" <cfif
getTimeLinesRet.Status_ID IS getStatusRet.Status_ID
>Selected</cfif>>#Status#</option>
                            </cfloop>
                        </select>
                    </td>

I would expect that since the list is dynamically generated that it should
still work even though it is in a loop rather than an output query, but it
does not. Every record has the first item selected even though when I output
the query in query analyzer it shows that the Status_ID is different for the
second record. Any assistance would be appreciated.

Bruce

--
Bruce Sorge

"I'm a mawg: half man, half dog. I'm my own best friend!"




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272542
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to