user9259

Use execute SQL to update related fields

Discussion created by user9259 on Nov 7, 2015
Latest reply on Nov 7, 2015 by wimdecorte

I often use triggers on fields to update sort fields in related tables. For example; I will have a CONTACTS & INVOICES table and have the name field in both tables. Yes, they are related by CONTACTS Primary Key; but I would have that name field in Invoice table for sorting in a list for performance reasons. So if someone updates the name field in CONTACTS; then I will update name in related Invoices with a looping script or sometimes Replace Field Contents.


Is there a way to do this without go to layout, find ID, Loop? I was wondering if I can set the field via current context with execute sql?

Outcomes