0

Clean field when i duplicate table

There is a table 1 and a button to make it a duplicate for a new day with formula 

let x := dialog("NEW DAY TEMPLATE", "Do you want create template for a next day?", ["No", "Yes"]);
if x = "Yes" then
    let c := duplicate(this);
    let t := this;
    c.(DATE := t.DATE + 1);
    openRecord(c)
end

But I need the number fields to be empty, and the text fields to be duplicated. 
How to change this formula

4 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 10 mths ago
    • Reported - view

    Before the openRecord(c) line, you can add this for the numbers that needs to be empty:

    c.(number1 := null);

    c.(number2 := null);

    ....

      • iliper LTD
      • iliper_LTD
      • 10 mths ago
      • Reported - view

       Thank you

    • Mel_Charles
    • 10 mths ago
    • Reported - view

    follow on after your open record record with null commands

    openRecord(c);
    c.('numberfield' := null);

    etc for every field you want to clear

    you can delete any previous linked records ie such as 

    delete c.'Purchase Orders';
    delete c.'Delivery Notes'

      • iliper LTD
      • iliper_LTD
      • 10 mths ago
      • Reported - view

       Thank you

Content aside

  • Status Answered
  • 10 mths agoLast active
  • 4Replies
  • 52Views
  • 2 Following