This makes it just a little less ugly (all those hashes are
unnecessary and distracting):

<cfset nRange = "1, 2, 3, 4, 5" />
<cfset vRange = ValueList( rs_RFQ.xpNum ) />
<cfset dRange =  ReplaceList( nRange, vRange, ',' ) />

<select name="x">
  <cfloop index="i" list="#dRange#">
   <cfif Val(i)><option value="#i#">#i#</option></cfif>
  </cfloop>
</select>

It's a little unclear to me as to what you are doing here though; is
it right that you want dRange to be a number list from 1-5 *minus* any
of those numbers that are in the xpNum column of your resultset? If
so, I think that is a good solution, though I might make the variable
names a little less cryptic:

<cfset numbers = "1, 2, 3, 4, 5" />
<cfset numbersToExclude = ValueList( rs_RFQ.xpNum ) />
<cfset numbers =  ReplaceList( numbers, numbersToExclude,  ',' ) />

<select name="x">
  <cfloop index="i" list="#numbers#">
   <cfif Val(i)><option value="#i#">#i#</option></cfif>
  </cfloop>
</select>

Dominic

2009/4/13 morchella <[email protected]>:
>
> got it..
> but its ugly
>
>
> <Cfset vRange = #ValueList(rs_RFQ.xpNum,",")#>
> <cfset dRange =  #ReplaceList(nRange,"#vRange#", "")#>
>
> <select name="x">
> <cfloop index="i" list="#dRange#" delimiters=",">
>  <cfif #i# NEQ " "><option value="#i#">#i#</option></cfif>
> </cfloop>
> </select>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321559
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to