• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

FindNoCase

Explorer ,
Sep 20, 2013 Sep 20, 2013

Copy link to clipboard

Copied

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

Views

575

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 21, 2013 Sep 21, 2013

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation