This will always return a value of one based off the default delimiter of "," . <cfset foo = "a"> <cfoutput>#listlen(foo)#</cfoutput>
You may want to check to see what is being sent in your form. On 11/6/06, T Burke <[EMAIL PROTECTED]> wrote: > I have a cfc that traverses a list of items that comes from a multi-select > combo box on a form. > > It works great unless there is only one item in the list (i.e. user selected > only > one option on the combo list) > > Then it treats the variable as a string, not a list.... > #listlen(form.foo)# = 0 even though form.foo = 'a' > #listlen(form.foo)# = 1 if form.foo='a, b' > > ARRRGGGHH.... I would like to have my cfloop manage the variable regardless > of how many items (more than zero) are in the list. Is there a way an > elegant method of > checking the contents if my list besides if form.foo neq '' and > listlen(form.foo) eq 0 ?..... > > IsList() is a function long overdue to CF.... > > (working in CFMX7 by the way) > Thanks DG > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259296 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

