1 Reply Latest reply on Sep 21, 2013 4:16 PM by Aegis Kleais

    FindNoCase

    kt03 Level 1

      Hi,

       

      i want to find the if the record from the list is matched with the record from the query  but my code is not working.  Can you please help?

       

      <cfset variables.subListItems = valuelist(variables.FindNocost.cost ,',') />

       

        <cfset variables.FindSubNoCost = report_Nocost.getSubNoCost() />

       

        <cfloop query="variables.FindSubNoCost">

         #listFindNoCase(variables.subListItems ,item, ",")#

        </cfloop>

       

      Thanks

        • 1. Re: FindNoCase
          Aegis Kleais Level 3

          To my knowledge, lists don't have records, just indexes.  ie, in the following list "Alpha, Bravo, Charlie, Delta", each word is considered the index, which is separated by the delimeter (in this case, a comma).

           

          As for your first line, dump out VARIABLES.subListItems to ensure it generates the value you expect.  Also, for the valueList() BIF, you do not need to provide the delimeter if it is a comma (that is the default), you can just use:

          <cfset VARIABLES.subListItems = valueList( VARIABLES.FindNoCase.cost ) />  The VARIABLES.FindNoCost.cost variable needs to be a proper Query Column.  Try running an isQuery() BIF on the VARIABLES.FindNoCost variable.

           

          Also, do a dump on your VARIABLES.FindSubNoCost variable to ensure you have the expected records in it.  This dumping process is part of ensuring that you are not going under the assumption that the data is one thing, but it is in fact, not.

           

          Also, ensure you are in a <cfoutput> so that the YES/NO returned from listFindNoCase() is shown to you.  Also, you can remove the comma designator from the listFindNoCase() BIF as well.