I believe the bottom code does that, you will just need to change the cfif statement, give it another try, or look up ListFind in your help files. ListFind returns true or false depending on whether the element is in the list or not. You would use ListFind if you want it case sensitive, and ListFindNoCase for case insensitivity.
Sincerely, Ricardo Sanoja Senior Web Architect Version 4 Technologies, LLC. 4288 Kellway Circle Addison, TX 75001-4200 972.267.1558 Ext 19 [EMAIL PROTECTED] -----Original Message----- From: phumes1 [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 1:39 PM To: [EMAIL PROTECTED] Subject: RE: Checking contents of cookie Maybe I'm not explaining my problem clearly. Let say for example I have the following cookie text which may be different based on every user. <cfoutput> #COOKIE.DisplayGroups# </cfoutput> Administrators,Users,Work,Dave,Paul,Jimmy,Sarah How can I check the above cookie string to see if "Dave" exists. If so, run some code. 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
