0

Automatic full fill number type field in new record from number type field of previous record in same table

Is there aby way (formula) how to automaticly full fill number field with number field from previous record in same table?

I need that one field of new record will be automaticly full filled with value of another field of previous record.  

2 replies

null
    • Mconneen
    • 5 yrs ago
    • Reported - view

    I would use an On Create Trigger..   Assume you have  a table named "Charts".   Assume that you want to copy 'Project Nbr' field of the previous record...  Knowing that IDs are sequential .. you could put the following in the Charts "Trigger on Create" 

    let t := this;
    t.('Project Nbr' := first((select Charts)[Id = number(t.Id) - 1]).'Project Nbr')

    • friml
    • 5 yrs ago
    • Reported - view

    Thank you, it is exactly what I need.

Content aside

  • 5 yrs agoLast active
  • 2Replies
  • 2148Views