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,

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Fred
    • Fred
    • 9 days 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.

    Like 1
    • Mike
    • ninox.1
    • 9 days ago
    • Reported - view

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

    Like
Like Follow
  • 9 days agoLast active
  • 2Replies
  • 17Views
  • 2 Following