Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 4.0   4.1   4.2   4.3   4.4   5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

List.BestMatch

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

Component: List
Version: 5.0
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

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

Parameters

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

Result

Returns best match, empty or error.

Description

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.

Examples

Looking for best match for Hilo will find Hello:

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

See also


List.And   -   List.CrossProduct

Feedback: Report problem or ask question.




Links
MBS Realbasic PDF Plugins - Nachhilfe in Nickenich