Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1    Statistic  


Looks for best match of a text in a list of texts.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
List 5.0 Yes Yes Yes Yes Yes

MBS( "List.BestMatch"; List; SearchText )


Parameter Description Example value
List The list to process. "Hello" ¶ "" ¶ "World"
SearchText The text to search. "Hello"


Returns best match, empty or error.


Looks for best match of a text in a list of texts.
If not found, returns empty result, so FileMaker function isEmpty() will tell you if it's empty (instead of just having no text).
Uses internally the Text.LevenshteinDistance function to compare all items and look for best match.

See also QuickList.BestMatch in case you need to query several times and want to load list only once.


Looking for best match for Hilo will find Hello:

MBS( "List.BestMatch"; "Test¶Hello¶World¶Hallo"; "Hilo" )

See also

List.And   -   List.CSVSplit

Feedback: Report problem or ask question.

MBS Xojo tutorial videos