Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6080 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I just discovered that PatternCount() doesn't check for overlapping strings.

For instance the calculation:

Let(

list = "1¶2¶3¶4¶4¶3¶3";

PatternCount(¶ & list & ¶; "¶4¶")

)

returns 1.

Threw me for a loop when I was trying to get a count of a specific value in a list. So,

Let(

list = "2¶2¶4¶4¶2¶14¶2¶41";

PatternCount(list; 4)

)

returns 4, but I want the result (for both examples) to be 2.

As I type this I realize FilterValues() and ValueCount() will do what I want.

But the PatternCount() thing is still weird isn't it?

Posted

I don't find it weird. It's documented in the help, and it matches the Position() function which isn't inclusive either:

Position ( "Mississippi" ; "issi" ; 1 ; 2 ) returns 0.

It would be easy to write an inclusive PatternCount() custom function, if needed.

This topic is 6080 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.