February 2, 200223 yr 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.
February 2, 200223 yr 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.
February 4, 200223 yr Author 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 ]
Create an account or sign in to comment