0

Button for duplicate last records

I have table "Daly Estimation", and subtable "Hourly Estimation". I need formula for button, with will located in "Daly Estimation" table, to duplicate last record in "Hourly Estimation" and open duplicated record. in new record will change just Date Time

'Date+Time' := 'Date+Time' now ()

Regards

3 replies

null
    • ekalcasino777
    • 2 yrs ago
    • Reported - view
    • Fred
    • 2 yrs ago
    • Reported - view

    You can try something like:

    let lastRec := last('Hourly Estimation');
    let dupRec := duplicate(lastRec);
    dupRec.('Date+Time' := now())
    

    This assumes that the record with the highest record Id in the subtable is the actual "latest" record for your work flow. If not then you will need to filter the subtable selection so it gets the record you need.

      • ekalcasino777
      • 2 yrs ago
      • Reported - view

      Fred works fine, thanks a lot