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 4035 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi there I have a filtered portal that uses pattern count to filter....

 

It works fine but I would quite like the pattern count to behave a bit differently....

Instead of it looking at the whole word I would like it to act on just the start... eg...

 

If a user types "Neff" then Neff should appear but NOT Benne or Hene!

Posted

If a user types "Neff" then Neff should appear but NOT Benne or Hene!

 

Those wouldn't appear anyway, because PatternCount checks for the presence of the entire string, and not any sub-string permutations. Do you mean you want to see “Neff”, but not, say, "Mister Neff” or “aNeff”? Then try:

Let (
f = myTable::myPortalFilter ;
f = Left ( portalTO::field ; Length ( f ) )
)

If you want to apply PatternCount to the first word, try:

PatternCount ( LeftWords ( portalTO::field ; 1 ) ; myTable::myPortalFilter )
Posted

 

Those wouldn't appear anyway, because PatternCount checks for the presence of the entire string, and not any sub-string permutations. Do you mean you want to see “Neff”, but not, say, "Mister Neff” or “aNeff”? Then try:

Let (
f = myTable::myPortalFilter ;
f = Left ( portalTO::field ; Length ( f ) )
)

If you want to apply PatternCount to the first word, try:

PatternCount ( LeftWords ( portalTO::field ; 1 ) ; myTable::myPortalFilter )

Basically I want ...

 

Patterncount( "Neff";"Ne") to return 1 BUT Patterncount( "Neff";"ff") to return 0... because I want the pattercount to only work starting from the beginning of the string.

Posted

Basically I want ...

 

Patterncount( "Neff";"Ne") to return 1 BUT Patterncount( "Neff";"ff") to return 0... because I want the pattercount to only work starting from the beginning of the string.

 

Well, then you're not actually searching for a pattern, but comparing two strings; use the first method.

This topic is 4035 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.