Wouldn't do that..... unless you can guarantee the list....
ie (using the crap extra of 'gram' in the code example below)... List
contains would match the 'programs' entry before the actual 'grams'
entry, giving I would assume an incorrect answer
My version of the code required would look something like this... (not
tested tho)
<cfset SESSION.DisplayShowMe = "mywork,utitlies">
<cfset urls = "mywork,documents,programs,utilities,gram">
<cfloop list="#SESSION.DisplayShowMe#" index="thisShowMe">
<cfset bShow = False>
<cfif ListFindNoCase(urls, thisShowMe)>
<cfset bShow = True>
</cfif>
<cfif bShow>
Match Found!
<cfelse>
No Match Found!
</cfif>
</cfloop>
HTH
DC
> -----Original Message-----
> From: Randell B Adkins
> Sent: 16 July 2003 15:03
> To: CF-Talk
> Subject: Re: Syntax not correct?
>
>
> Did you try ListContains
>
>
>
> >>> [EMAIL PROTECTED] 07/16/03 09:58AM >>>
> Hi,
>
> Whats wrong with the syntax below. It doesn't seem to work.
>
> The below SESSIOn varaible is equal to 'mywork'
>
> I want to check the SESSION variable for 'mywork' and if it
> exists do this...other do else.
>
> The SESSION could contains multiple checks. For example the
> <cfset could contain:
>
> <cfset urls = "mywork,documents,programs,utilities">...etc.
>
>
> #SESSION.DisplayShowMe#<br>
>
> <cfset urls = "mywork">
>
> <cfif listFindNoCase(urls,SESSION.DisplayShowMe)>
> Match Found!
> <cfelse>
> No Match!
> </cfif>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at
http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4