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

Recommended Posts

Posted

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?

Posted

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)

Posted

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?

Posted (edited)

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

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