Try ListFind()

Also (if you can) build your lists with a "good" delimiter.  the Bell
character is great.

ListAppend(YourList,YourListItem,chr(7))

Then: ListFind(YourList,AnItem,chr(7))


> Hi
>
> I have the following piece of code that checks to see if a user can see a
> specific pageid or not. Unfortunately it is not doing the job as I have a
> list that looks something like this:
>
> 4,14,3,2,8,44
>
> If the user is allowed to see page 4, then he would be able to see all
pages
> that contains a 4, so it does not work correctly.
>
>
> <cfif listcontains(newlist,  "#pageid#")>
> <cfinclude template=#page#>
> <cfelse>
> <cfoutput>
> #application.securityerror#
> </cfoutput>
> </cfif>
>
> Regards
> Carlo
> 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
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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