PatternCount() in calculations
BeginnerUse PatternCount() to count substring occurrences, validate list membership, and build conditional logic based on text patterns.
What you'll learn
- How PatternCount() matches substrings case-insensitively
- How to check value-list membership with padded PatternCount()
- How to count word occurrences in a text block
- Common pitfalls with partial substring matching
PatternCount(text; searchString) returns the number of times searchString appears in text, case-insensitively. This makes it useful not just for counting but for checking membership, validating formats, and detecting multi-keyword conditions in a single calculation.
1/4
1
Basic PatternCount() usage
PatternCount counts every occurrence of searchString in text, including overlapping positions. It is case-insensitive.
FileMaker Script
PatternCount ( "FileMaker is great. FileMaker is fast." ; "FileMaker" ) // -> 2 PatternCount ( "hello WORLD" ; "world" ) // -> 1 (case-insensitive) PatternCount ( "banana" ; "an" ) // -> 2 (positions 2 and 4)
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo