Trigger after update record not triggered when linking/adding records to sub-table
I don't know if this is a bug or a feature, but the Trigger after update is only triggered when editing data in normal fields. Any change in a sub-table does not trigger the script. Is there any trick?
Of course, I've added a button that the client can press to manually trigger the scripts, but they can easily forget to clic the button anytime they make changes to sub-tables...
The Trigger after update: has to be on the updated table or field. So if you had a Trigger on update: at the table level of the parent
if sum((child).total) = 0 then status := "out of stock" end
but the figures are being updated in the child table, the Trigger after update: actually needs to be at the table level of the child
if sum((parent.child).total) = 0 then parent.status := "out of stock" end
John Halls Great! Also, your example gave me the clue I needed! So, just by placing an array formula (sum, average, first, last, etc) in a field is enough to trigger the after update in the child table.
It's not intuitive, but makes sense (the parent table is not changing, only the "view" of the child table). I need to think as Ninox thinks, and then everything else begins to make sense.
Thanks again, John Halls