Reference > Functions reference > Text functions > PatternCount
 

PatternCount

Returns the number of occurrences of searchString in text.

Format 

PatternCount(text;searchString)

Parameters 

text - any text expression or text field

searchString - any text expression or text field representing the set of characters you want to find

Data type returned 

number

Originated in 

FileMaker Pro 6.0 or earlier

Description 

This function is not case sensitive. PatternCount begins at the start of text and counts each non-overlapping occurrence of searchString.

Example 1 

PatternCount ( "Mississippi" ; "is" ) returns 2.

Example 2 

PatternCount ( "Mississippi" ; "issi" ) returns 1 (the function isn’t inclusive).

Example 3 

PatternCount ( Attending ; "Guest" ) returns 1 if the Guest checkbox is one of the items selected in the Attending field.

Example 4 

PatternCount ( Get ( AccountPrivilegeSetName ) ; "Guest" ) returns 0 if the current account has the Full Access privilege set.

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas