Jump to content

This topic is 8419 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Have 2 tables, Main and Component with records related via serial number.

I need to find a way to raise a flag in Main when all related records in Component have the same condition met.

i.e. - when the "completed" field for all 3 components related to the master say "yes" a field in master automatically says "yes" too.

Thanks in advance.

Posted

I usually set up boolean fields, i.e. True/False, Yes/No, Flagged/Unflagged as number fields that will only ever contain either 1 or 0, and format the field appropriately.

If you follow that standard, then in your Main file you can define a new calculation field:

Valid_Flag (unstored, number) = Sum(Related_Components::Flag) = 3

will return 1 if all 3 components are flagged.

If each record in the main file has a different number of related components then

Valid_Flag (unstored, number) = Sum(Related_Components::Flag) = Count(Related_Components::Flag)

should work.

Posted

That did the trick. Just what I was looking for.

Thanks a bunch, Bridge!

BTW, my scenario calls for the second version of your solution with different totals of related. Should have mentioned that originally...

[ February 04, 2002, 11:58 AM: Message edited by: Jim Mitchell ]

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