Could you do something like set up a list to hold all the values you're
looking for then check it against the value of the cookie (even if you
have to loop through the list)? As well, I'm not sure what you mean by
not wanting an exact match... are you only looking for partial matches
of the terms? Are there a large number of groups that may be in the
cookie that won't be in this list of 10-15?

-----Original Message-----
From: phumes1 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:16 PM
To: [EMAIL PROTECTED]
Subject: RE: Checking contents of cookie



Yes, but I was hoping there was just a one line piece of code that would

check the cookie string for either one of the three groups and not an
exact 
match.

The cookie could contain up to 10-15 different groups based on user.

I want to avoid doing the following:

<cfif ListFindNoCase(COOKIE.DisplayGroups,"Administrators") OR
ListFindNoCase(COOKIE.DisplayGroups,"Users") OR
ListFindNoCase(COOKIE.DisplayGroups,"Work") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group") OR
ListFindNoCase(COOKIE.DisplayGroups,"Another Group")>
          CODE HERE...
</cfif>


At 12:11 PM 5/1/2002 -0500, you wrote:
>Do you mean you want to perform an action if the cookie contains any of
>those 3? If so, a simple change should do it:
>
>
><cfif ListFindNoCase(COOKIE.DisplayGroups,"Administrators") OR
>ListFindNoCase(COOKIE.DisplayGroups,"Users") OR
>ListFindNoCase(COOKIE.DisplayGroups,"Work")>
>          CODE HERE...
></cfif>
>
>-----Original Message-----
>From: phumes1 [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 12:07 PM
>To: [EMAIL PROTECTED]
>Subject: RE: Checking contents of cookie
>
>
>
>I have a cookie that returns the following
>
><cfoutput>
>#COOKIE.DisplayGroup#
></cfoutput>
>
>Administrators,Users,Work
>
>The code below looks for an EXACT match of the above cookie. How can I
>just
>search/find either
>Administrators or Users or WORK within the cookie?
>
><cfif ListFindNoCase(COOKIE.DisplayGroups,"Administrators")>
>          CODE HERE...
></cfif>
>
>
>
>+----------------------------------------------------------------------
-
>------------+
>
>Philip Humeniuk
>[EMAIL PROTECTED]
>[EMAIL PROTECTED]
>+----------------------------------------------------------------------
-
>-------------+
>
>
>
>-----------------------------------------------------------------------
-
>-
>This email server is running an evaluation copy of the MailShield anti-
>spam software. Please contact your email administrator if you have any
>questions about this message. MailShield product info:
>www.mailshield.com
>
>-----------------------------------------------
>To post, send email to [EMAIL PROTECTED]
>To subscribe / unsubscribe: http://www.dfwcfug.org
>
>-----------------------------------------------------------------------
--
>This email server is running an evaluation copy of the MailShield anti-
>spam software. Please contact your email administrator if you have any
>questions about this message. MailShield product info:
www.mailshield.com
>
>-----------------------------------------------
>To post, send email to [EMAIL PROTECTED]
>To subscribe / unsubscribe: http://www.dfwcfug.org


+-----------------------------------------------------------------------
------------+ 

Philip Humeniuk
[EMAIL PROTECTED]
[EMAIL PROTECTED]
+-----------------------------------------------------------------------
-------------+



------------------------------------------------------------------------
-
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info:
www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to