Having trouble with findnocase and not sure I understand...I've inherited some code, never used the findnocase before.  In this scenario it is being used to only show information on the page if the person logged in has a role of developer, which is a value of 1.  This is the code:
<CFIF FINDNOCASE(1,#session.role#) GT 0> ... where session.role contains the string of roles for that user logged in.  The role could be a single digit (like 1) or a comma separated list (like 3,4,6,10).

Right now, it is showing on everyone's page.
Lee R Liddick JrReporting AnalystAsked:
Who is Participating?
Brijesh ChauhanConnect With a Mentor Staff IT EngineerCommented:
FINDNOCASE either returns the position of the search string or zero if it is not able to find the string, if your session.role is a list then you can replace the above with listFind function as below..

<cfif listFind(session.role,1)>

if the role list contains 1, it would go inside the cfif condition otherwise not.

Lee R Liddick JrReporting AnalystAuthor Commented:
Thank you B...understood.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.