Functions (all)


Function Name:
The function checks a specified record’s text fields (e.g. Name, Place, Address, Note, etc) to see whether it contains text that matches a given search text. It returns TRUE if it finds a match.
Minimum FH Version:
3 (originally parameter 1 had to be a record, but from version 4.1 onwards this was broadened to allow any data item to be used)
No. of Parameters:
Return Type:
Boolean (True or False)
Parameter 1:
A reference to a data item - often, but not necessarily, a record
Parameter 2:
The search text to check. This can contain more than one word. A field is deemed to match the text if it contains all of the words in the search text. However, they do not have to be whole word matches (e.g. "Hampshire" will match "Shire"), case does not have to match, and the words do not have to be in the same order, contiguous, or even close to each other, in the field in question.
Parameter 3:

This parameter can be used to modify the behaviour of the function.

No modifications. The default.
Has no effect unless the item being checked is a record. With this option, the function will check not only the original record, but also all shared notes (i.e. Note records) that it may be linked to. With Individual records, it will also check associated spouse family records, and any Note records that they in turn may be linked to.

=ContainsText(%INDI%, "Australia", EXT)


=ContainsText(%INDI%, ["Enter Text"], EXT)

The second example, when used in a query, causes a prompt to be displayed so that you specify the text when the query is run.