1

How do I move a record to another table?

How do I move a record from one table to another?

5replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Fred
    • Fred
    • 8 mths ago
    • Reported - view

    If it is a one time thing and with a limited amount of data, then you can:

     

    1) manually input the data into Table2

     

    or

     

    2) export the record from Table1 and then import the record into Table2

     

    If this is an ongoing task then you can:

     

    1) do step 2 from above

     

    or

     

    2) investigate the create function and possibly the for function.

    Like
    • svs
    • svs
    • 8 mths ago
    • Reported - view

    Thank you. there is no way to directly move a record to another table in the same DB?

    Like
    • Fred
    • Fred
    • 8 mths ago
    • Reported - view

    Ninox would have to develop some function like the export/import function. There would have to be a screen where it asks you to line up the fields that you want to "move" the record to, then ask if you want to keep/delete the "old" one. I don't know if any DB has this function built in.

    Like
    • Nick
    • Nick
    • 8 mths ago
    • Reported - view

    I'm using this code for this task (copy the record to table B and delete the record from table A)

    ---

    let reply := dialog("", "Would you like to continue moving this record to Table B", ["Yes", "No"]);
    if reply = "Yes" then
    let TempB := (create 'Table B');
    let myT := Text;
    let myN := Number;
    TempB.(Text := myT);
    TempB.(Number := myN);
    delete this;
    openRecord(TempB);
    alert("Record moved successfully")
    end

    ---

     

    Examine the code and change field names accordingly.

    Like 1
  • Like
Like1 Follow
  • 1 Likes
  • 3 mths agoLast active
  • 5Replies
  • 344Views
  • 2 Following