0 Replies Latest reply on Dec 26, 2006 1:53 PM by emmim44

    ListFind

    emmim44 Level 1
      This thing is bugging me..

      I am trying to check the select boxes based on the data on db. The data on the page is populated dynamicly...but some how it checks only one check boxes even though there are 2 matching records in Db..Pls any suggestions?
      Also see the attached doc.

      And valuelist(gethomefacTmp.facid) : {37,37,38,3,4}

      And valuelist(gethomefacTmp.homefac) : {HH,MB,CB,,,}


      sample code
      -----------
      <cfloop index="b" from="1" to="#fs#">
      <cfset fid=#facid#>
      <cfset fac=#facname#>
      <cfset fn=#firstname#>

      <cfif ListFind(valuelist(gethomefacTmp.facid), NumberFormat(fid, "._")) >

      <cfif facname eq "VR">
      <cfset count=count+1>
      <cfset chkV="checked">
      <cfelse>
      <cfset chk="checked"><cfset chkV="">
      </cfif>

      <cfelse>

      <cfset chk=""><cfset chkV="">
      </cfif>

      <cfset fl="n">
      <input type="checkbox" name="Occ" <cfif facname eq "VR" >#chkV#<cfelse>#chk#</cfif> value="#facname#|#facsch#|#facid#|#b##i#|#fl#|#fl#<cfif facname eq "VR">|#w#</cfif>">

      <cfif facname neq "VR">
      Open Spot<br />
      <cfelse>
      #fid# #facname#
      <select name="Vr12H8H" >
      <option value=""></option>
      <cfloop query="gethomefac">
      <option value="#fc#" <cfif ListFindnocase(valuelist(gethomefacTmp.homefac),fc) and ListFind(valuelist(gethomefacTmp.facid), NumberFormat(fid, "._")) and chkV neq "" >selected</cfif> >#fc#</option>


      </cfloop>
      </select><br />
      </cfif>

      </cfloop>