79219381

Date: 2024-11-24 05:39:33
Score: 3.5
Natty:
Report link

Ok - thanks to the jmcilhinney comment - it got me thinking. I found a solution - although it is not working exactly the way I want/need it to.

  1. Create a new calculated field in the Detail table - with expression like Len(Child.TextField) This will put a number in that field for each child record.
  2. In the calculated field in the Master table - use the following expression IIF (Sum(Child.CalcLenField) > 0, true, false) This causes a summation of the Lengths of all the child records. If any one of them has text in this field - then it sets the value of the calculated field in the Master to TRUE.

Now - this part was exactly what I was hoping to do - but it only gets calculated when I move the to the active record in the grid attached to the Master table. This makes sense - but not what was I was trying to do. I need to have the boolean value in the Table showing in the grid all the time - not just when I move to that record... I need to know which Master records have at least one Detail record with text in that field...

I guess I will have to create a calculated field and populate it in code when ever the table is loaded - or either the Master or Detail table are changed. Many thanks to those who took time to comment!

Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (1): to comment
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: G Bradley MacDonald