- CFML Reference User Guide
- ColdFusion functions
- ColdFusion functions by category
- Functions a-b
- Abs
- ACos
- AddSOAPRequestHeader
- AddSOAPResponseHeader
- AjaxLink
- AjaxOnLoad
- ApplicationStop
- ArrayAppend
- ArrayAvg
- ArrayClear
- ArrayContains
- ArrayContainsNoCase
- ArrayDelete
- ArrayDeleteAt
- ArrayDeleteNoCase
- ArrayEach
- ArrayFilter
- ArrayFind
- ArrayFindAll
- ArrayFindAllNoCase
- ArrayFindNoCase
- ArrayInsertAt
- ArrayIsDefined
- ArrayIsEmpty
- ArrayLen
- ArrayMap
- ArrayMax
- ArrayMin
- ArrayNew
- ArrayPrepend
- ArrayReduce
- ArrayResize
- ArraySet
- ArraySetMetadata
- ArraySlice
- ArraySort
- ArraySum
- ArraySwap
- ArrayToList
- Asc
- ASin
- Atn
- AuthenticatedContext
- AuthenticatedUser
- BinaryDecode
- BinaryEncode
- BitAnd
- BitMaskClear
- BitMaskRead
- BitMaskSet
- BitNot
- BitOr
- BitSHLN
- BitSHRN
- BitXor
- BooleanFormat
- Abs
- Functions-c-d
- CacheGet
- CacheGetAllIds
- CacheGetMetadata
- CacheGetProperties
- CacheGetSession
- CacheIdExists
- CachePut
- CacheRegionExists
- CacheRegionNew
- CacheRegionRemove
- CacheRemove
- CacheRemoveAll
- CacheSetProperties
- CallStackDump
- CallStackGet
- CanDeSerialize
- Canonicalize
- CanSerialize
- Ceiling
- CharsetDecode
- CharsetEncode
- Chr
- CJustify
- Compare
- CompareNoCase
- Cos
- CreateDate
- CreateDateTime
- CreateObject
- CreateObject: .NET object
- CreateObject: COM object
- CreateObject: component object
- CreateObject: CORBA object
- CreateObject: Java or EJB object
- CreateObject: web service object
- CreateODBCDate
- CreateODBCDateTime
- CreateODBCTime
- CreateSignedJWT
- CreateEncryptedJWT
- CreateTime
- CreateTimeSpan
- CreateUUID
- CSRFGenerateToken
- CSRFVerifyToken
- CSVRead
- CSVWrite
- CSVProcess
- DateAdd
- DateCompare
- DateConvert
- DateDiff
- DateFormat
- DatePart
- DateTimeFormat
- Day
- DayOfWeek
- DayOfWeekAsString
- DayOfYear
- DaysInMonth
- DaysInYear
- DE
- DecimalFormat
- DecodeForHTML
- DecodeFromURL
- DecrementValue
- Decrypt
- DecryptBinary
- DeleteClientVariable
- Deserialize
- DeserializeJSON
- DeserializeXML
- DirectoryCopy
- DirectoryCreate
- DirectoryDelete
- DirectoryExists
- DirectoryList
- DirectoryRename
- DollarFormat
- DotNetToCFType
- Duplicate
- Functions-e-g
- EncodeForCSS
- EncodeForDN
- EncodeForHTML
- EncodeForHTMLAttribute
- EncodeForJavaScript
- EncodeForLDAP
- EncodeForURL
- EncodeForXML
- EncodeForXMLAttribute
- EncodeForXpath
- Encrypt
- EncryptBinary
- EntityDelete
- EntityLoad
- EntityLoadByExample
- EntityLoadByPK
- EntityMerge
- EntityNew
- EntityReload
- EntitySave
- EntityToQuery
- Evaluate
- Exp
- ExpandPath
- FileClose
- FileCopy
- FileDelete
- FileExists
- FileGetMimeType
- FileIsEOF
- FileMove
- FileOpen
- FileRead
- FileReadBinary
- FileReadLine
- FileSeek
- FileSetAccessMode
- FileSetAttribute
- FileSetLastModified
- FileSkipBytes
- FileUpload
- FileUploadAll
- FileWrite
- FileWriteLine
- Find
- FindNoCase
- FindOneOf
- FirstDayOfMonth
- Fix
- Floor
- FormatBaseN
- GeneratePBKDFKey
- GenerateSecretKey
- GetApplicationMetadata
- GetAuthUser
- GetBaseTagData
- GetBaseTagList
- GetBaseTemplatePath
- GetClientVariablesList
- GetComponentMetaData
- GetContextRoot
- GetCPUUsage
- GetCurrentTemplatePath
- GetCSPNonce
- GetDirectoryFromPath
- GetEncoding
- GetException
- GetFileFromPath
- GetFileInfo
- GetFreeSpace
- GetFunctionCalledName
- GetFunctionList
- GetGatewayHelper
- GetHttpRequestData
- GetHttpTimeString
- GetK2ServerDocCount
- GetK2ServerDocCountLimit
- GetLocale
- GetLocaleDisplayName
- GetLocalHostIP
- GetMetaData
- GetMetricData
- GetPageContext
- GetPropertyString
- GetPropertyFile
- GetPrinterInfo
- GetPrinterList
- GetProfileSections
- GetProfileString
- GetReadableImageFormats
- GetSafeHTML
- GetSAMLAuthRequest
- GetSAMLLogoutRequest
- Generate3DesKey
- GenerateSAMLSPMetadata
- GetSOAPRequest
- GetSOAPRequestHeader
- GetSOAPResponse
- GetSOAPResponseHeader
- GetSystemFreeMemory
- GetSystemTotalMemory
- GetTempDirectory
- GetTempFile
- GetTemplatePath
- GetTickCount
- GetTimeZoneInfo
- GetToken
- GetTotalSpace
- GetUserRoles
- GetVFSMetaData
- GetWriteableImageFormats
- Functions-h-im
- Hash
- HMac
- Hour
- HQLMethods
- HTMLCodeFormat
- HTMLEditFormat
- IIf
- ImageAddBorder
- ImageBlur
- ImageClearRect
- ImageCopy
- ImageCreateCaptcha
- ImageCrop
- ImageDrawArc
- ImageDrawBeveledRect
- ImageDrawCubicCurve
- ImageDrawLine
- ImageDrawLines
- ImageDrawOval
- ImageDrawPoint
- ImageDrawQuadraticCurve
- ImageDrawRect
- ImageDrawRoundRect
- ImageDrawText
- ImageFlip
- ImageGetBlob
- ImageGetBufferedImage
- ImageGetEXIFMetadata
- ImageGetEXIFTag
- ImageGetHeight
- ImageGetIPTCMetadata
- ImageGetIPTCTag
- ImageGetMetadata
- ImageGetWidth
- ImageGrayscale
- ImageInfo
- ImageMakeColorTransparent
- ImageMakeTranslucent
- ImageNegative
- ImageNew
- ImageOverlay
- ImagePaste
- ImageRead
- ImageReadBase64
- ImageResize
- ImageRotate
- ImageRotateDrawingAxis
- ImageScaleToFit
- ImageSetAntialiasing
- ImageSetBackgroundColor
- ImageSetDrawingColor
- ImageSetDrawingStroke
- ImageSetDrawingTransparency
- ImageSharpen
- ImageShear
- ImageShearDrawingAxis
- ImageTranslate
- ImageTranslateDrawingAxis
- ImageWrite
- ImageWriteBase64
- ImageXORDrawingMode
- Functions-in-k
- IncrementValue
- InputBaseN
- Insert
- Int
- InterruptThread
- InvalidateOauthAccesstoken
- Invoke
- InitSAMLAuthRequest
- InitSAMLLogoutRequest
- InvokeCFClientFunction
- IsArray
- IsAuthenticated
- IsAuthorized
- IsBinary
- IsBoolean
- IsClosure
- IsCustomFunction
- IsDate
- IsDateObject
- IsDDX
- IsDebugMode
- IsDefined
- IsImage
- IsImageFile
- IsInstanceOf
- IsIPv6
- IsJSON
- IsK2ServerABroker
- IsK2ServerDocCountExceeded
- IsK2ServerOnline
- IsLeapYear
- IsLocalHost
- IsNull
- IsNumeric
- IsNumericDate
- IsObject
- isOnline
- IsPDFArchive
- IsPDFFile
- IsPDFObject
- IsProtected
- IsQuery
- isSamlLogoutResponse
- isSafeHTML
- IsSimpleValue
- IsSOAPRequest
- IsSpreadsheetFile
- IsSpreadsheetObject
- IsStruct
- isThreadInterrupted
- IsUserInAnyRole
- IsUserInRole
- IsUserLoggedIn
- IsValid
- IsValidOauthAccesstoken
- IsWDDX
- IsXML
- IsXmlAttribute
- IsXmlDoc
- IsXmlElem
- IsXmlNode
- IsXmlRoot
- JavaCast
- JSStringFormat
- Functions-l
- LCase
- Left
- Len
- ListAppend
- ListChangeDelims
- ListContains
- ListContainsNoCase
- ListDeleteAt
- ListEach
- ListFilter
- ListFind
- ListFindNoCase
- ListFirst
- ListGetAt
- ListGetDuplicates
- ListInsertAt
- ListLast
- ListLen
- ListMap
- ListPrepend
- ListQualify
- ListReduce
- ListRemoveDuplicates
- ListRest
- ListSetAt
- ListSort
- ListToArray
- ListValueCount
- ListValueCountNoCase
- LJustify
- Location
- Log
- Log10
- LSCurrencyFormat
- LSDateFormat
- LSDateTimeFormat
- LSEuroCurrencyFormat
- LSIsCurrency
- LSIsDate
- LSIsNumeric
- LSNumberFormat
- LSParseCurrency
- LSParseDateTime
- LSParseEuroCurrency
- LSParseNumber
- LSTimeFormat
- LTrim
- Functions-m-r
- Max
- Mid
- Min
- Minute
- Month
- MonthAsString
- Now
- NumberFormat
- ObjectEquals
- ObjectLoad
- ObjectSave
- OnWSAuthenticate
- ORMClearSession
- ORMCloseAllSessions
- ORMCloseSession
- ORMEvictCollection
- ORMEvictEntity
- ORMEvictQueries
- ORMExecuteQuery
- ORMFlush
- ORMFlushall
- ORMGetSession
- ORMGetSessionFactory
- ORMIndex
- ORMIndexPurge
- ORMReload
- ORMSearch
- ORMSearchOffline
- ParagraphFormat
- ParameterExists
- ParseDateTime
- Pi
- PrecisionEvaluate
- ProcessSAMLResponse
- ProcessSAMLLogoutRequest
- Quarter
- PreserveSingleQuotes
- QueryAddColumn
- QueryAddRow
- QueryConvertForGrid
- QueryExecute
- QueryFilter
- QueryGetResult
- QueryGetRow
- QueryKeyExists
- QueryMap
- QueryNew
- QueryReduce
- QuerySetCell
- QuotedValueList
- QueryEach
- Rand
- Randomize
- RandRange
- ReEscape
- REFind
- REFindNoCase
- ReleaseComObject
- REMatch
- REMatchNoCase
- RemoveCachedQuery
- RemoveChars
- RepeatString
- Replace
- ReplaceList
- ReplaceNoCase
- REReplace
- REReplaceNoCase
- RestDeleteApplication
- RestSetResponse
- RestInitApplication
- Reverse
- Right
- RJustify
- Round
- RTrim
- Functions-s
- Second
- SendGatewayMessage
- SendSAMLLogoutResponse
- Serialize
- SerializeJSON
- SerializeXML
- SessionInvalidate
- SessionRotate
- SessionGetMetaData
- SessionInvalidate
- SessionRotate
- SetDay
- SetEncoding
- SetHour
- SetLocale
- SetMonth
- SetProfileString
- SetPropertyString
- SetVariable
- SetYear
- Sgn
- Sin
- Sleep
- SpanExcluding
- SpanIncluding
- SpreadsheetAddAutoFilter
- SpreadsheetAddColumn
- SpreadsheetAddFreezePane
- SpreadsheetAddImage
- SpreadsheetAddInfo
- SpreadsheetAddPageBreaks
- SpreadsheetAddRow
- SpreadsheetAddRows
- SpreadsheetAddSplitPane
- SpreadsheetCreateSheet
- SpreadsheetDeleteColumn
- SpreadsheetDeleteColumns
- SpreadsheetDeleteRow
- SpreadsheetDeleteRows
- SpreadsheetFormatCell
- SpreadsheetFormatColumn
- SpreadsheetFormatCellRange
- SpreadsheetFormatColumn
- SpreadsheetFormatColumns
- SpreadsheetFormatRow
- SpreadsheetFormatRows
- SpreadsheetGetCellComment
- SpreadsheetGetCellFormula
- SpreadsheetGetCellValue
- SpreadsheetGetColumnCount
- SpreadsheetInfo
- SpreadsheetMergeCells
- SpreadsheetNew
- SpreadsheetRead
- SpreadsheetReadBinary
- SpreadsheetRemoveSheet
- SpreadsheetSetActiveSheet
- SpreadsheetSetActiveSheetNumber
- SpreadsheetSetCellComment
- SpreadsheetSetCellFormula
- SpreadsheetSetCellValue
- SpreadsheetSetColumnWidth
- SpreadsheetSetFooter
- SpreadsheetSetHeader
- SpreadsheetSetRowHeight
- SpreadsheetShiftColumns
- SpreadsheetShiftRows
- SpreadsheetWrite
- StreamingSpreadsheetNew
- StreamingSpreadsheetCleanup
- StreamingSpreadsheetRead
- StreamingSpreadsheetProcess
- SpreadsheetSetFooterImage
- SpreadsheetSetHeaderImage
- SpreadsheetSetFittoPage
- SpreadsheetUngroupColumns
- SpreadsheetGroupColumns
- SpreadsheetUngroupRows
- SpreadsheetGroupRows
- SpreadsheetRemoveColumnBreak
- SpreadsheetSetColumnBreak
- SpreadsheetRemoveRowBreak
- SpreadsheetSetRowBreak
- SpreadsheetRemovePrintGridlines
- SpreadsheetAddPrintGridlines
- SpreadsheetGetColumnWidth
- SpreadsheetSetColumnHidden
- SpreadsheetSetRowHidden
- SpreadsheetisColumnHidden
- SpreadsheetisRowHidden
- SpreadsheetisStreamingXmlFormat
- SpreadsheetisXmlFormat
- SpreadsheetisBinaryFormat
- SpreadsheetRenameSheet
- SpreadsheetRemoveSheetNumber
- SpreadsheetGetLastRowNumber
- SpreadsheetGetPrintOrientation
- Sqr
- StripCR
- StructAppend
- StructClear
- StructCopy
- StructCount
- StructDelete
- StructEach
- StructFilter
- StructFind
- StructFindKey
- StructFindValue
- StructGet
- StructGetMetadata
- StructInsert
- StructIsEmpty
- StructKeyArray
- StructKeyExists
- StructKeyList
- StructMap
- StructNew
- StructReduce
- StructSetMetadata
- StructSort
- StructToSorted
- StructUpdate
- StructValueArray
- StoreSetMetadata
- StoreGetACL
- StoreGetMetadata
- StoreAddACL
- StoreSetACL
- Functions-t-z
- Tan
- ThreadJoin
- ThreadTerminate
- Throw
- TimeFormat
- ToBase64
- ToBinary
- ToScript
- ToString
- Trace
- Transactionandconcurrency
- TransactionCommit
- TransactionRollback
- TransactionSetSavePoint
- Trim
- UCase
- URLDecode
- URLEncodedFormat
- URLSessionFormat
- Val
- ValueList
- VerifyClient
- Week
- Wrap
- WriteDump
- WriteLog
- WriteOutput
- WSGetAllChannels
- WSGetSubscribers
- WSPublish
- WSSendMessage
- XmlChildPos
- XmlElemNew
- XmlFormat
- XmlGetNodeType
- XmlNew
- XmlParse
- XmlSearch
- XmlTransform
- XmlValidate
- Year
- YesNoFormat
- ColdFusion tags
- ColdFusion tag summary
- ColdFusion tags by category
- Application framework tags
- Communications tags
- Database manipulation tags
- Data output tags
- Debugging tags
- Exception handling tags
- Extensibility tags
- File management tags
- Flow-control tags
- Forms tags
- Internet Protocol tags
- Page processing tags
- Security tags
- Variable manipulation tags
- Other tags
- Tags a-b
- Tags c
- cfcache
- cfcalendar
- cfcase
- cfcatch
- cfchart
- cfchart tag in ColdFusion
- Get started with cfchart
- Customize a chart using cfchart
- Advanced cfchart customization options
- Create an area chart in ColdFusion
- Create line charts in ColdFusion
- Create bar charts in ColdFusion
- Create floating bar charts in ColdFusion
- Create histograms in ColdFusion
- Create pie charts in ColdFusion
- Create funnel charts in ColdFusion
- Create pyramid charts in ColdFusion
- Create curve charts in ColdFusion
- Create boxplots in ColdFusion
- Create donut charts in ColdFusion
- Create bubble charts in ColdFusion
- Create scatterplots in ColdFusion
- Create radar charts in ColdFusion
- Other chart types in ColdFusion (Cone, Cylinder, Piano, and Bullet)
- Advanced customization options in cfchart
- cfchartdata
- cfchartseries
- cfchartset
- cfclient
- cfclientsettings
- cfcol
- cfcollection
- cfcomponent
- cfcontent
- cfcontinue
- cfcookie
- Tags f
- cffeed
- cffile
- cffile action = "append"
- cffile action = "copy"
- cffile action = "delete"
- cffile action = "move"
- cffile action = "read"
- cffile action = "readBinary"
- cffile action = "rename"
- cffile action = "upload"
- cffile action = "uploadAll"
- cffile action = "write"
- cffileupload
- cffinally
- cfflush
- cfform
- cfformgroup
- cfformitem
- cfftp
- cfftp: Connection: file and directory operations
- cfftp: Opening and closing FTP server connections
- cfftp : Opening and closing secure FTP server connections
- cfftp action = "listDir"
- cffunction
- Tags g-h
- Tags i
- Tags j-l
- cfjava
- cflayout
- cflayoutarea
- cfldap
- cflocation
- cflock
- cflog
- cflogin
- cfloginuser
- cflogout
- cfloop
- cfloop : conditional loop
- cfloop : index loop
- cfloop : looping over a COM collection or structure
- cfloop : looping over a date or time range
- cfloop : looping over a list, a file, or an array
- cfloop : looping over a query
- Tags m-o
- cfmail
- cfmailparam
- cfmailpart
- cfmap
- cfmapitem
- cfmediaplayer
- cfmenu
- cfmenuitem
- cfmessagebox
- cfmodule
- cfNTauthenticate
- cfoauth
- cfobject
- cfobject: .NET object
- cfobject: COM object
- cfobject: component object
- cfobject: CORBA object
- cfobject: Java or EJB object
- cfobject: web service object
- cfobjectcache
- cfoutput
- Tags p-q
- Tags r-s
- Tags t
- Tags u-z
- CFML Reference
- Reserved words and variables
- Ajax JavaScript functions
- Ajax JavaScript functions
- Function summary Ajax
- ColdFusion.Ajax.submitForm
- ColdFusion.Autosuggest.getAutosuggestObject
- ColdFusion.Layout.enableSourceBind
- ColdFusion.MessageBox.getMessageBoxObject
- ColdFusion.ProgressBar.getProgressBarObject
- ColdFusion.MessageBox.isMessageBoxDefined
- JavaScriptFunctionsinColdFusion9Update1
- ColdFusion ActionScript functions
- ColdFusion mobile functions
- Application.cfc reference
- Script functions implemented as CFCs
- ColdFusion Flash Form style reference
- Styles valid for all controls
- Styles for cfform
- Styles for cfformgroup with horizontal or vertical type attributes
- Styles for box-style cfformgroup elements
- Styles for cfformgroup with accordion type attribute
- Styles for cfformgroup with tabnavigator type attribute
- Styles for cfformitem with hrule or vrule type attributes
- Styles for cfinput with radio, checkbox, button, image, or submit type attributes
- Styles for cftextarea tag and cfinput with text, password, or hidden type attributes
- Styles for cfselect with size attribute value of 1
- Styles for cfselect with size attribute value greater than 1
- Styles for cfcalendar tag and cfinput with dateField type attribute
- Styles for the cfgrid tag
- Styles for the cftree tag
- ColdFusion Flash Form Style Reference
- ColdFusion event gateway reference
- ColdFusion Event Gateway reference
- addEvent
- CFEvent
- CFEventclass
- Constructor
- Gateway development interfaces and classes
- getStatus
- setCFCPath
- setCFCMethod
- getOriginatorID
- getLogger
- getBuddyList
- getBuddyInfo
- IM gateway message sending commands
- IM Gateway GatewayHelper class methods
- onIncomingMessage
- onIMServerMessage
- onBuddyStatus
- onAddBuddyResponse
- onAddBuddyRequest
- IM Gateway CFC incoming message methods
- IM gateway methods and commands
- CFML CFEvent structure
- warn
- info
- setOriginatorID
- data command
- submit Multi command
- submit command
- setGatewayType
- setGatewayID
- setData
- setCFCListeners
- outgoingMessage
- getStatusTimeStamp
- numberOfMessagesReceived
- numberOfMessagesSent
- removeBuddy
- removeDeny
- removePermit
- setNickName
- setPermitMode
- setStatus
- SMS Gateway CFEvent structure and commands
- SMS Gateway incoming message CFEvent structure
- getStatusAsString
- getProtocolName
- getPermitMode
- getPermitList
- getNickName
- getName
- getDenyList
- getCustomAwayMessage
- getQueueSize
- getMaxQueueSize
- getHelper
- getGatewayType
- getGatewayServices
- getGatewayID_1
- getGatewayID
- getData
- getCFCTimeout
- setCFCTimeout
- getCFCPath
- getCFCMethod
- GatewayServices class
- Gateway interface
- GatewayHelper interface
- addPermit
- addDeny
- addBuddy
- error
- debug
- Logger class
- stop
- start
- CFML event gateway SendGatewayMessage data parameter
- restart
- fatal
- SMS gateway message sending commands
- ColdFusion C++ CFX Reference
- ColdFusion Java CFX reference
- WDDX JavaScript Objects
- Cloud services
- ColdFusion and GCP Storage
- ColdFusion and GCP Firestore
- ColdFusion and GCP PubSub
- ColdFusion and Amazon S3
- ColdFusion and DynamoDB
- ColdFusion and Amazon SQS
- ColdFusion and Amazon SNS
- ColdFusion and MongoDB
- ColdFusion and Azure Blob
- ColdFusion and Azure Service Bus
- Multi-cloud storage services
- Multi-cloud RDS databases
- ColdFusion and Azure Cosmos DB
Description
Determines the index of the first list element in which a specified value occurs.
Returns
Index of the first list element that contains value. If not found, returns zero. The search is case-insensitive.
History
ColdFusion (2018 release): Introduced named parameters.
Category
Function syntax
ListFindNoCase(list, value [, delimiters, includeEmptyFields ])
See also
ListContains, ListFind; Lists in Data types- Developing guide in the Developing ColdFusion Applications
Parameters
Parameter |
Description |
|---|---|
includeEmptyValues |
Optional. Set to yes to include empty values. |
list |
A list or a variable that contains one. |
value |
Number or string for which to search. The search is case-insensitive. |
delimiters |
A string or a variable that contains one. Characters that separate list elements. The default value is comma. If this parameter contains more than one character, ColdFusion processes each occurrence of each character as a delimiter. |
Usage
ColdFusion ignores empty list elements; thus, the list "a,b,c,,,d" has four elements.
Example
<cfscript>
myList="Tokyo,Bangkok,bangkok,bangKok,Jakarta,Manila,Bangalore,Shanghai";
myFind=ListFindNoCase(myList,"bangkok");
WriteOutput(myFind); // Returns 2
</cfscript>
Output
2
Real-world uses of the ListFindNoCase function
User search and auto-complete systems
A customer support portal with a comprehensive knowledge base serves 10,000+ users who search for solutions using natural language queries. Users often type search terms in varying cases (uppercase, lowercase, mixed case), and the system needs to provide consistent, accurate results regardless of how users format their search terms.
How it helps:
- Increase in successful search results through case flexibility
- Users find information faster regardless of typing style
- Fewer support requests
- More content discovered through flexible matching
<cfscript>
// Simple Knowledge Base Search with ListFindNoCase
// Business: Customer support portal with case-insensitive help topic search
// Available help topics (standardized format)
helpTopics = "Installation,Configuration,Troubleshooting,API,Database,Security,Performance";
// User searches (various case formats from different interfaces)
userSearches = [
{"query": "installation", "user": "Mobile User"},
{"query": "API", "user": "Developer"},
{"query": "database", "user": "Admin"},
{"query": "SECURITY", "user": "Manager"},
{"query": "troubleshooting", "user": "Support Agent"}
];
// Auto-suggest function
function getHelpSuggestions(searchTerm, topicList) {
local.suggestions = [];
local.topicArray = ListToArray(topicList);
for (local.topic in local.topicArray) {
if (FindNoCase(searchTerm, local.topic) > 0) {
ArrayAppend(local.suggestions, local.topic);
}
}
return local.suggestions;
}
</cfscript>
<cfoutput>
<h1>📚 ListFindNoCase: Knowledge Base Search Demo</h1>
<p><strong>Business Need:</strong> Help users find support articles regardless of how they type search terms</p>
<p><strong>Challenge:</strong> Users type in different cases - "api", "API", "Api" should all work</p>
<p><strong>Solution:</strong> Use ListFindNoCase() for flexible topic matching</p>
<hr>
<h2>Available Help Topics</h2>
<div style="background: ##f8f9fa; padding: 15px; border: 1px solid ##ddd; margin: 10px 0;">
<p><strong>Topics:</strong> #helpTopics#</p>
<p><em>Users can search for any topic using any capitalization</em></p>
</div>
<h2>User Search Results</h2>
</cfoutput>
<cfloop array="#userSearches#" index="search">
<cfscript>
// Use ListFindNoCase for exact topic matching
topicPosition = ListFindNoCase(helpTopics, search["query"]);
isExactMatch = topicPosition > 0;
// Get auto-suggest results for partial matches
suggestions = getHelpSuggestions(search["query"], helpTopics);
</cfscript>
<cfoutput>
<div style="background: #isExactMatch ? '##d4edda' : (ArrayLen(suggestions) GT 0 ? '##fff3cd' : '##f8d7da')#; padding: 15px; margin: 10px 0; border-radius: 5px;">
<h3>#search["user"]# searches for: "#search["query"]#"</h3>
<cfif isExactMatch>
<p>✅ <strong>Exact Topic Match Found!</strong></p>
<p>Topic: <strong>#ListGetAt(helpTopics, topicPosition)#</strong></p>
<p>Position in List: #topicPosition#</p>
<p>🔗 <em>Redirecting to help article...</em></p>
<cfelseif ArrayLen(suggestions) GT 0>
<p>📝 <strong>Similar Topics Available:</strong></p>
<p>Suggestions: <strong>#ArrayToList(suggestions)#</strong></p>
<p>💡 <em>Did you mean one of these topics?</em></p>
<cfelse>
<p>❌ <strong>No matches found</strong></p>
<p>Try searching for: Installation, Configuration, Troubleshooting, API, Database, Security, or Performance</p>
</cfif>
</div>
</cfoutput>
</cfloop>
<cfscript>
// Calculate search success statistics
exactMatches = 0;
partialMatches = 0;
noMatches = 0;
for (search in userSearches) {
topicFound = ListFindNoCase(helpTopics, search["query"]) > 0;
suggestions = getHelpSuggestions(search["query"], helpTopics);
if (topicFound) {
exactMatches++;
} else if (ArrayLen(suggestions) > 0) {
partialMatches++;
} else {
noMatches++;
}
}
totalSearches = ArrayLen(userSearches);
successRate = totalSearches > 0 ? Round(((exactMatches + partialMatches) / totalSearches) * 100) : 0;
</cfscript>
<cfoutput>
<h2>📊 Search Analytics</h2>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin: 20px 0;">
<div style="background: ##e8f5e8; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Exact Matches</h3>
<h2 style="color: green;">#exactMatches#</h2>
</div>
<div style="background: ##fff8dc; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Partial Matches</h3>
<h2 style="color: orange;">#partialMatches#</h2>
</div>
<div style="background: ##ffe4e1; padding: 15px; text-align: center; border-radius: 5px;">
<h3>No Matches</h3>
<h2 style="color: red;">#noMatches#</h2>
</div>
<div style="background: ##e3f2fd; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Success Rate</h3>
<h2 style="color: blue;">#successRate#%</h2>
</div>
</div>
</cfoutput>
eCommerce product search and category navigation
An online retail platform with 500,000+ products uses tag-based categorization and search filtering. Customers search using natural language with varying capitalization, and the system must provide accurate product matches regardless of how search terms are formatted, ensuring optimal shopping experience and conversion rates.
<cfscript>
// Simple E-Commerce Category Filter with ListFindNoCase
// Business: Online store with case-insensitive product category filtering
// Available product categories (standardized format)
categories = "Electronics,Fashion,Home,Sports,Books,Automotive,Health,Beauty";
// Customer filter selections (various cases from different interfaces)
customerFilters = [
{"filter": "electronics", "source": "Mobile App", "customer": "John Smith"},
{"filter": "FASHION", "source": "Desktop (Caps Lock)", "customer": "Mary Johnson"},
{"filter": "Home", "source": "Voice Search", "customer": "Alex Chen"},
{"filter": "sports", "source": "Search Bar", "customer": "Sarah Wilson"},
{"filter": "BEAUTY", "source": "Category Menu", "customer": "Mike Brown"}
];
// Function to simulate product counts per category
function getProductCount(categoryName) {
switch(categoryName) {
case "Electronics": return 1247;
case "Fashion": return 892;
case "Home": return 634;
case "Sports": return 456;
case "Books": return 2145;
case "Automotive": return 378;
case "Health": return 523;
case "Beauty": return 689;
default: return 0;
}
}
</cfscript>
<cfoutput>
<h1>🛍️ ListFindNoCase: E-Commerce Category Filter Demo</h1>
<p><strong>Business Need:</strong> Allow customers to filter products by category regardless of typing case</p>
<p><strong>Challenge:</strong> Mobile auto-capitalize, caps lock, and different typing styles create case variations</p>
<p><strong>Solution:</strong> Use ListFindNoCase() for flexible category matching</p>
<hr>
<h2>Available Product Categories</h2>
<div style="background: ##f8f9fa; padding: 15px; border: 1px solid ##ddd; margin: 10px 0;">
<p><strong>Categories:</strong> #categories#</p>
<p><em>Customers can filter by any category name using any capitalization</em></p>
</div>
<h2>Customer Filter Processing</h2>
</cfoutput>
<cfloop array="#customerFilters#" index="customerFilter">
<cfscript>
// Use ListFindNoCase to validate category filter
categoryPosition = ListFindNoCase(categories, customerFilter["filter"]);
isValidCategory = categoryPosition > 0;
if (isValidCategory) {
// Get properly formatted category name and product count
properCategoryName = ListGetAt(categories, categoryPosition);
productCount = getProductCount(properCategoryName);
} else {
properCategoryName = "";
productCount = 0;
}
</cfscript>
<cfoutput>
<div style="background: #isValidCategory ? '##d4edda' : '##f8d7da'#; padding: 15px; margin: 10px 0; border-radius: 5px;">
<h3>🛒 Customer: #customerFilter["customer"]#</h3>
<p><strong>Platform:</strong> #customerFilter["source"]#</p>
<p><strong>Filter Input:</strong> "#customerFilter["filter"]#"</p>
<cfif isValidCategory>
<p>✅ <strong>Valid Category Filter!</strong></p>
<p>Matched Category: <strong>#properCategoryName#</strong></p>
<p>Category Position: #categoryPosition#</p>
<p>📦 Products Available: <strong>#NumberFormat(productCount, "999,999")#</strong></p>
<p>🎯 <em>Showing products in #properCategoryName# category...</em></p>
<cfelse>
<p>❌ <strong>Invalid Category Filter</strong></p>
<p>Filter "#customerFilter["filter"]#" not found in available categories</p>
<p>💡 <em>Showing all products instead or suggesting similar categories</em></p>
</cfif>
</div>
</cfoutput>
</cfloop>
<cfscript>
// Calculate filter processing statistics
validFilters = 0;
totalProducts = 0;
for (filter in customerFilters) {
position = ListFindNoCase(categories, filter["filter"]);
if (position > 0) {
validFilters++;
categoryName = ListGetAt(categories, position);
totalProducts += getProductCount(categoryName);
}
}
totalCustomers = ArrayLen(customerFilters);
filterSuccessRate = totalCustomers > 0 ? Round((validFilters / totalCustomers) * 100) : 0;
</cfscript>
<cfoutput>
<h2>📊 Category Filter Analytics</h2>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin: 20px 0;">
<div style="background: ##e8f5e8; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Total Filters</h3>
<h2 style="color: blue;">#totalCustomers#</h2>
</div>
<div style="background: ##d4edda; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Valid Filters</h3>
<h2 style="color: green;">#validFilters#</h2>
</div>
<div style="background: ##fff8dc; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Success Rate</h3>
<h2 style="color: orange;">#filterSuccessRate#%</h2>
</div>
<div style="background: ##e3f2fd; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Products Found</h3>
<h2 style="color: purple;">#NumberFormat(totalProducts, "999,999")#</h2>
</div>
</div>
<h2>🎯 Real-World Category Matching</h2>
<div style="background: ##f8f9fa; padding: 15px; border: 1px solid ##ddd; margin: 10px 0;">
<p><strong>Common Customer Input Variations:</strong></p>
<ul>
<li><strong>"electronics"</strong> (lowercase) → Matches "Electronics"</li>
<li><strong>"FASHION"</strong> (caps lock) → Matches "Fashion"</li>
<li><strong>"Home"</strong> (proper case) → Matches "Home"</li>
<li><strong>"sports"</strong> (mobile typing) → Matches "Sports"</li>
<li><strong>"BEAUTY"</strong> (tablet caps) → Matches "Beauty"</li>
</ul>
</div>
</cfoutput>
Employee directory and access management
A multinational corporation with 50,000+ employees manages access permissions and directory searches across multiple systems. Employee names, department codes, and role assignments are entered by various HR systems and regional offices, creating case inconsistencies that must be resolved for accurate permission management and directory functionality.
How it helps:
- Increase in successful employee searches
- Reliability in access control decisions
- Smooth data exchange between HR systems
- Consistent functionality regardless of data entry variations
<cfscript>
// Simple Employee Directory Department Search with ListFindNoCase
// Business: Corporate directory with case-insensitive department and role lookup
// Company departments (standardized format from HR system)
companyDepartments = "Engineering,Marketing,Sales,HR,Finance,Operations,Legal,Support";
// Employee roles (standard job classifications)
employeeRoles = "Manager,Director,Analyst,Developer,Designer,Coordinator,Specialist,Associate";
// Directory search requests (from various internal systems and user interfaces)
directorySearches = [
{"query": "engineering", "type": "department", "searcher": "New Employee", "purpose": "Team Contact"},
{"query": "MARKETING", "type": "department", "searcher": "Project Manager", "purpose": "Collaboration"},
{"query": "manager", "type": "role", "searcher": "HR Recruiter", "purpose": "Org Chart"},
{"query": "DEVELOPER", "type": "role", "searcher": "Team Lead", "purpose": "Resource Planning"},
{"query": "Sales", "type": "department", "searcher": "Partner", "purpose": "Business Contact"}
];
// Function to simulate employee counts by department/role
function getEmployeeCount(searchType, searchValue) {
if (searchType == "department") {
switch(searchValue) {
case "Engineering": return 145;
case "Marketing": return 32;
case "Sales": return 67;
case "HR": return 18;
case "Finance": return 25;
case "Operations": return 42;
case "Legal": return 8;
case "Support": return 28;
default: return 0;
}
} else if (searchType == "role") {
switch(searchValue) {
case "Manager": return 45;
case "Director": return 12;
case "Analyst": return 38;
case "Developer": return 89;
case "Designer": return 24;
case "Coordinator": return 16;
case "Specialist": return 31;
case "Associate": return 52;
default: return 0;
}
}
return 0;
}
</cfscript>
<cfoutput>
<h1>🏢 ListFindNoCase: Employee Directory Search Demo</h1>
<p><strong>Business Need:</strong> Enable flexible employee directory searches by department and role</p>
<p><strong>Challenge:</strong> Users search using different case formats across multiple systems and interfaces</p>
<p><strong>Solution:</strong> Use ListFindNoCase() for case-insensitive directory lookup</p>
<hr>
<h2>Corporate Directory Structure</h2>
<div style="background: ##f8f9fa; padding: 15px; border: 1px solid ##ddd; margin: 10px 0;">
<p><strong>Departments:</strong> #companyDepartments#</p>
<p><strong>Roles:</strong> #employeeRoles#</p>
<p><em>Directory searches work with any capitalization format</em></p>
</div>
<h2>Directory Search Results</h2>
</cfoutput>
<cfloop array="#directorySearches#" index="search">
<cfscript>
// Use ListFindNoCase to find department or role
if (search["type"] == "department") {
searchPosition = ListFindNoCase(companyDepartments, search["query"]);
searchList = companyDepartments;
} else {
searchPosition = ListFindNoCase(employeeRoles, search["query"]);
searchList = employeeRoles;
}
isFound = searchPosition > 0;
if (isFound) {
matchedValue = ListGetAt(searchList, searchPosition);
employeeCount = getEmployeeCount(search["type"], matchedValue);
} else {
matchedValue = "";
employeeCount = 0;
}
</cfscript>
<cfoutput>
<div style="background: #isFound ? '##d4edda' : '##f8d7da'#; padding: 15px; margin: 10px 0; border-radius: 5px;">
<h3>👤 Search Request from: #search["searcher"]#</h3>
<p><strong>Search Type:</strong> #UCase(Left(search["type"], 1)) & LCase(Right(search["type"], Len(search["type"])-1))# | <strong>Purpose:</strong> #search["purpose"]#</p>
<p><strong>Search Query:</strong> "#search["query"]#"</p>
<cfif isFound>
<div style="margin: 10px 0;">
<p>✅ <strong>#search["type"] == "department" ? "Department" : "Role"# Found!</strong></p>
<p>Matched #search["type"] == "department" ? "Department" : "Role"#: <strong>#matchedValue#</strong></p>
<p>Directory Position: #searchPosition#</p>
<p>👥 Employees Found: <strong>#NumberFormat(employeeCount)#</strong></p>
<p>🔗 <em>Click to view employee list with contact information and organizational details</em></p>
</div>
<cfif search["purpose"] == "Team Contact">
<p>📞 <em>Showing team leads and direct contact information</em></p>
<cfelseif search["purpose"] == "Collaboration">
<p>🤝 <em>Displaying project managers and collaboration tools</em></p>
<cfelseif search["purpose"] == "Org Chart">
<p>📊 <em>Generating organizational hierarchy and reporting structure</em></p>
<cfelseif search["purpose"] == "Resource Planning">
<p>📋 <em>Showing skill sets and availability for project assignment</em></p>
<cfelseif search["purpose"] == "Business Contact">
<p>💼 <em>Providing external contact information and business cards</em></p>
</cfif>
<cfelse>
<p>❌ <strong>#search["type"] == "department" ? "Department" : "Role"# Not Found</strong></p>
<p>Search term "#search["query"]#" did not match any #search["type"]#</p>
<cfif search["type"] == "department">
<p>💡 <em>Available Departments: Engineering, Marketing, Sales, HR, Finance, Operations, Legal, Support</em></p>
<cfelse>
<p>💡 <em>Available Roles: Manager, Director, Analyst, Developer, Designer, Coordinator, Specialist, Associate</em></p>
</cfif>
</cfif>
</div>
</cfoutput>
</cfloop>
<cfscript>
// Calculate directory search statistics
departmentSearches = 0;
roleSearches = 0;
successfulSearches = 0;
totalEmployeesFound = 0;
for (search in directorySearches) {
if (search["type"] == "department") {
departmentSearches++;
position = ListFindNoCase(companyDepartments, search["query"]);
if (position > 0) {
successfulSearches++;
matchedDept = ListGetAt(companyDepartments, position);
totalEmployeesFound += getEmployeeCount("department", matchedDept);
}
} else {
roleSearches++;
position = ListFindNoCase(employeeRoles, search["query"]);
if (position > 0) {
successfulSearches++;
matchedRole = ListGetAt(employeeRoles, position);
totalEmployeesFound += getEmployeeCount("role", matchedRole);
}
}
}
totalSearches = ArrayLen(directorySearches);
searchSuccessRate = totalSearches > 0 ? Round((successfulSearches / totalSearches) * 100) : 0;
</cfscript>
<cfoutput>
<h2>📊 Directory Search Analytics</h2>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin: 20px 0;">
<div style="background: ##e8f5e8; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Dept Searches</h3>
<h2 style="color: blue;">#departmentSearches#</h2>
</div>
<div style="background: ##fff8dc; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Role Searches</h3>
<h2 style="color: orange;">#roleSearches#</h2>
</div>
<div style="background: ##d4edda; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Success Rate</h3>
<h2 style="color: green;">#searchSuccessRate#%</h2>
</div>
<div style="background: ##e3f2fd; padding: 15px; text-align: center; border-radius: 5px;">
<h3>Employees Found</h3>
<h2 style="color: purple;">#NumberFormat(totalEmployeesFound)#</h2>
</div>
</div>
<h2>🎯 Case Flexibility Examples</h2>
<div style="background: ##f8f9fa; padding: 15px; border: 1px solid ##ddd; margin: 10px 0;">
<p><strong>How ListFindNoCase() Handles Corporate Directory Searches:</strong></p>
<ul>
<li><strong>"engineering"</strong> (lowercase) → Finds "Engineering" department (145 employees)</li>
<li><strong>"MARKETING"</strong> (uppercase) → Finds "Marketing" department (32 employees)</li>
<li><strong>"manager"</strong> (lowercase) → Finds "Manager" role (45 employees)</li>
<li><strong>"DEVELOPER"</strong> (caps lock) → Finds "Developer" role (89 employees)</li>
<li><strong>"Sales"</strong> (proper case) → Finds "Sales" department (67 employees)</li>
</ul>
</div>
</cfoutput>
