Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pattern Count but only acting on the start of your query...?

Featured Replies

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!

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 )
  • Author

 

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.

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.