*Beating the horse*

This would work:

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

Or the crazy bracket thing ;)
 <cfif getTimeLinesRet.Status_ID IS getStatusRet.Status_ID[currentrow]>

Or the super crazy, but ALWAYS right:

 <cfif getTimeLinesRet.Status_ID IS
getStatusRet.Status_ID[getStatusRet.currentrow]>

Basically just NEVER DO what you had done, k?

If getTimeLinesRet is a query, you may want to be specific about what
row value you're talking about too, like getTimeLinesRet.Status_ID[1]

:)

On 3/13/07, Bruce S wrote:
> 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 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272620
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