How to check values from valuelist in coldfusion -
i have emp records records this:
name, id, gender, itemvalue steve, 123, m,    (3,4,5) bond, 456,  m,    (5,4) james, 345,   f,  (4,7) in table have references of itemvalues this:
3='test'  4='coder' 5='admin' now in record value, how check single value itemvalues?  example, check whether steve's itemvalue 5 or not in coldfusion?
<cfif steve.itemvalue eq 5>       <cfelse>       if not 5 </cfif>   
you can use listfind() this:
<cfloop query="getemployee">   <cfif findnocase("steve", getemployee.name) , listfind(getemployee.itemvalue, "5">       <cfelse>       if not 5   </cfif> </cfloop> 
Comments
Post a Comment