At 08:34 AM 5/2/2002 -0400, you wrote:
> > I also need to check if the cookie has "users" and ONLY "users". The
> > ContainsNoCase doesn't seem to work. Probably because its the wronf one to
> > use? Should I be using the ListFirst?
>
>listContains() and listContainsNoCase() search for a sub-string within each
>of the elements in the list, so that wouldn't be right as "Power Users"
>would match it as well as just "Users".
>
>If you want to check for that single item, compare the strings directly...
>
><cfif cookie.displayGroups is "users">
>
>You COULD use listFirst, but that would return true only if "users" were
>first in line, and other elements could be behind it, but you want to test
>for only "users" right?

Correct.

> > <cfif listFindNoCase(COOKIE.DisplayGroups, "test") OR
> >   listFindNoCase(COOKIE.DisplayGroups, "contract") OR
> >   listFindNoCase(COOKIE.DisplayGroups, "hrls") OR
> >   listFindNoCase(COOKIE.DisplayGroups, "support") OR
> >   listFindNoCase(COOKIE.DisplayGroups, "tax") AND
> >   ListFindNoCase("fmt",listLast(#Session.stDirFileName[i]#, ".")) OR
> >   listContainsNoCase(COOKIE.DisplayGroups, "users") AND
> >   ListFindNoCase("fmt",listLast(#Session.stDirFileName[i]#, "."))>
> > <cfelse>
> > LIST DIRECTORY STRUCTURE EXCEPT FOR "FMT"
> > </cfif>
>
>Try grouping your logic together into more defined groups using ().  Like..
>
>(a OR b OR c OR d OR e) AND ((f) OR (g AND h))
>
>Also, instead of...
>
>ListFindNoCase("fmt",listLast(#Session.stDirFileName[i]#, "."))
>
>..I'd use...
>
>right(Session.stDirFileName[i], 3) is "fmt"
>
>..since it's a direct text comparison and not a true list operation.
>
>Good point. Thanks again.



>-Justin Scott, Lead Developer
>  Sceiron Internet Services, Inc.
>  http://www.sceiron.com
>
>
>
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to