0

How do I update this code to auto create a new record in sub table balances that will link back to its parent - funds

let Nyear := last(Balances.Year) + 1;
let Nbeg := last(Balances.'Temp. Restricted');
let Nperm := last(Balances.'Perm. Restricted');
let i := (create Balances);
i.(Year := Nyear);
i.('Beginning Balance' := Nbeg);
i.('Perm. Restricted' := Nperm)

5 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    let currentRec := this
    let Nyear := last(Balances.Year) + 1;
    let Nbeg := last(Balances.'Temp. Restricted');
    let Nperm := last(Balances.'Perm. Restricted');
    let i := (create Balances);
    i.(Year := Nyear);
    i.('Beginning Balance' := Nbeg);
    i.('Perm. Restricted' := Nperm);
    i.(Balances := currentRec)

    • Wisconsin Masonic foundation
    • Gary
    • 4 yrs ago
    • Reported - view

    Sorry, line 9 is returning field not found error. Any thoughts?

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Sorry, i think instead of Balances in line 9 it must be the name of your parent table.

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    funds

    • Wisconsin Masonic foundation
    • Gary
    • 4 yrs ago
    • Reported - view

    Fantastic! Works perfectly!!!

Content aside

  • 4 yrs agoLast active
  • 5Replies
  • 1413Views