0

How to update a field from a different table?

Say I have a "Many" table called INVOICES and it has a date in it. I'd like to be able to update the parent table, say CUSTOMER, with a single date field whenever one of the invoice dates is either added (new record) or changed.

Is that possible? I can't (as usual) get the syntax to work. Even though the fields display in the dialog trying to to a simple assignment ":=" doesn't work.

Thanks,

2 replies

null
    • Fred
    • 1 yr ago
    • Reported - view

    Most things are possible.

    I was able to get the following to work in my test DB in a button in table2. Table2 is on the many side to 'toTable12':

    let t := this;
    toTable12.Num2 := t.weight
    

    This should also work in a Trigger.

    • ninox.1
    • 1 yr ago
    • Reported - view

    Yep, I put it in a trigger. It works! Thanks Fred.

Content aside

  • 1 yr agoLast active
  • 2Replies
  • 158Views
  • 2 Following