Jump 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.

Featured Replies

This is a technique I came across some time ago that I haven't seen elsewhere, so I thought I would share it.

Often I need to know if a field is one of a number of options and perform something if it is. The straight forward way to do this is something like:


( Item = "H100" ) or ( Item = "H110" ) or ( Item = "B100" ) or ( Item = "B110" )





I have one calculation in a solution I'm currently working on that has something like 20 possibilities. I found that I could use the PatternCount function to return the same results as above in a more compact form:





PatternCount( "H100 H110 B100 B110", Item )

Assuming that Item can have only one of the possibilities (i.e., Item can't contain something like "H100

Clever!

Hi,

Yes it is actually clever.

Got it from BobWeaver myself, but true is it is a rather unknown feature which has its place in a own post.

Bob's calc

Thanks

FileMaker 7 is supposed to "short circuit" calculations, meaning that once a condition is met, it stops evaluating the formula, so it processes faster. Since PatternCount() has to look through the whole text string, it would presumably be more efficient to use Position( "H100 H110 B100 B110", Item, 1, 1 ) .

If you need to force it to be a boolean, for whatever reason, not not Position( "H100 H110 B100 B110", Item, 1, 1 ) will do. I would also add spaces before and after the string to ensure partial matches don't occur. In the sample though, this doesn't seem like a strong possibility.

Create an account or sign in to comment

Important Information

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

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.