Perhaps you should turn that around... is there any group that would NOT trigger an execution of the code?
Or is it safe enough to see if the cookie exists and is not NULL? The solution that you are looking at is not good if another group is added. I would suggest that try to find another way. Jeremy -----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
