October 6, 200421 yr Ok, here's one I'm stumped on! This is simplified a bit, but gets the point across as to what I'm trying to do. I have a table of records. Each table can have a varying number of child records in a related table. Each parent will have at least one child, but can have an unlimited number after that. Each child has a field with text entered either "yes" or "no". In the parent record, I want a calculated field to return "yes" if every child record says "yes" and otherwise return "no." So: Child 1 = "no" Child 2 = "no" Parent = "no" Child 1 = "yes" Child 2 = "yes" Parent = "yes" Child 1 = "yes" Child 2 = "no" Child 3 = "yes" Parent = "no" Any ideas?
October 6, 200421 yr Make a calculation field in Child of field = "yes". This calc will return a 1 for all 'yes'es. Make a calculation field in Parent of Count(Child::serial) = Sum(Child::yescalc).
October 6, 200421 yr Define a field using the Min function for the child table and place the field on the parent layout (so the result will be for each parent). With "no" = 0 and "yes" = 1, if you have any child with "no", the result will be 0, otherwise 1.
October 6, 200421 yr Transpower's suggestion will probably be faster to calculate. Case( Min(Child::yescalc), "yes", "no" )
Create an account or sign in to comment