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.

Need help with calc to count total number of records with particular text phrase

Featured Replies

I'm an extreme noob that's been using Filemaker for maybe a month now so I'm having a little trouble with this calculation. I have a parent table in my database that contains a child relationship containing a field with a specific phrase I need to be able to count the occurrences of. I then want to display the total number of occurrences on the parent table.

How would I do this?

You'll need to define a calculated field in the child table:

PatternCount(field;phrase)

See PatternCount

Then in the parent table:

Sum(related::calc)

  • Author

Here's my next newbie question. If the pattern count is 0 (or blank), the calculation returns a blank value. How do I make it return a 0 value instead of a blank one?

If you wish only your child records to display a 0 if no pattern, uncheck 'do not evaluate if all referenced fields are empty' but if you want the parent calc to display 0, even if no children, you can use:

Max ( Sum ( childTable::patternCalc ) ; 0 ) :smile2:

UPDATE: And you can use a combination; ie, if you want the parent calc to display 0 if the parent has children but none have that pattern, only uncheck the child calc. Then the parent calc will display empty if no children or 0 if children but no pattern.

Edited by Guest
Added update

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.