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

Recommended Posts

Posted

Hello all,

I'm trying to build a calc formula that is aware of the number of times a particular value appears in a portal. I've attached a sample file which demonstrates what I mean.

Basically I need a formula in a calc field in the child table that says something like, "if this is the first or second time this employee's name appears in the portal, then . Else, if this is the third or fourth instance of this employee, then . I will gladly elaborate on if necessary, but the main issue is how to make my formula aware of how many times the employee's name appears in the portal. I'm thinking it may involve the List or PatternCount function, but I've been unable to nail it down.

Thanks very much for your time and assistance.

Example.fp7.zip

Posted

It is not quite clear from where would the particular value come from. Anyway, you could use something like:

ValueCount ( FilterValues ( List ( Employees::Value ) ; MyValue ) )

Posted

Thank you for your reply, comment. I apologize, I haven't explained this very well. I want to add a new field called 'cOccurence' to the child table. This field will track each occurence of each employee's name in the portal (see new attachment, it should illustrate this better). I will then incorporate the value returned by 'cOccurence' into the cPension formula.

Thank you for your time and patience.

occurence.png

Posted

I think it would help if you explained the background to this. The child table in your example is clearly NOT the Employees table, as it contains duplicate employee records - it seems this is a Tasks table? And I assume you want to calculate the occurrence number of an employee's task within the SAME parent record?

Posted

You are correct, comment -- it's not an employees table, it's actually a line items table. Each record in the parent table is an employment contract. Employee names go in the line items table. An employee name can appear one time or several times on a given contract. And yes, I want to calculate the number of occurrences of an employee within the same parent record.

Thank you

Posted

comment,

You NAILED it. Very nicely done-- thank you so much.

It looks like the join table is the important piece of the puzzle that I overlooked, huh. And then the self-join is what really makes it work.

Thank you for your time!

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