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

Recommended Posts

Posted

I have a one to many relationship where I need to calculate the value of a field in the parent based upon the value of a field in the children.

It's basically just a true of false value.

The parent is set to true by default.

If all the children have a false value, then

the parent is false.

My apologies if the explanation is poor.

I've attached a sample which makes things clear.

I appreciate any pointers.

conditions.fp7.zip

Posted (edited)

Theory is ... count the Tasks::TaskStatus. This will only count the field if it contains a value (done). I am assuming that Done or blank are the only possible values (by looking at your value list). And then count the number of child records. If the count is the same, all child records are done or boolean 1, otherwise JobStatus should be false or 0. So your Job Status should be a calculation (number). It will automatically be unstored. And the calculation would be:

Count ( tasks::kf_jobs ) = Count ( tasks::task_status )

When you wish to display this Job Status, select Format > Number and set it to boolean with only a value in the yes side. If the results need to be longer than 7 characters, you can use conditional formatting (place the words on the layout) and conditional format to turn the text same color as background if boolean 0 (false).

Edited by Guest
Added explanation about displaying words instead of 1 in Job Status
Posted (edited)

Thank you for the pointer. That worked like a charm. The theory part seems so obvious and I should be thinking that way. But I'm learning.

This is what worked for me in the job status calc field. I don't know if this is the most efficient way, but it worked.

if (Count ( tasks::kf_jobs ) = Count ( tasks::task_status ); int ( 1 ) )

Edited by Guest
Posted

Your formula is essentially the same as LaRetta's, but FYI, the first part "count(this) = count(that)" will evaluate to "1" if it's true. That's her formula -- and that's all you need. Your formula essentially says "If 1, then 1," which doesn't add any improvement, unless you work for the dept. of redundancy dept. :(

Posted

unless you work for the dept. of redundancy dept. :(

or any bureaucratic government office. :

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