0

Can I move items from one table to another?

Hi, is there a way to move items from one table to another? I have a database to stocktake household items and within it I have one table for Fridge items And another for Freezer items. If I decide to freeze something from the fridge, can I move it into the freezer table or do I have to delete it and re-enter it in the other table?

Thanks.

6 replies

null
    • Mconneen
    • 5 yrs ago
    • Reported - view

    You can put logic behind a button.. and when on the record click the button that would create a Freezer row.. and delete the Fridge row. 

    • Sean
    • 5 yrs ago
    • Reported - view

    @Mconneen-sensei, Even though this is possible, it might make more sense design-wise to have a Choice field with Fridge and Freezer options and then filter on that field.

    • Mconneen
    • 5 yrs ago
    • Reported - view

    @Sean.... Totally agree...  but answered the question asked.. LOL.. :) 

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

    Sean's way would be interesting with a Kanban view, where you can literally drag things from the fridge to the freezer...

    • Nick
    • 5 yrs ago
    • Reported - view

    If you still want to move data, use this code behind a button:

     

    let reply := dialog("", "Would you like to continue moving this record to Table B", ["Yes", "No"]);

    if reply = "Yes" then

    let tempB := (create Table2);

    let my1 := Field1;

    let my2 := Field2;

    tempB.(Field1 := my1);

    tempB.(Field2 := my2);

    delete this;

    openRecord(tempB);

    alert("Data moved successfully")

    end

     

    You can remove the dialog and alert lines if you want...

    • Mconneen
    • 5 yrs ago
    • Reported - view

    +1 on the Kanban view.. 

Content aside

  • 5 yrs agoLast active
  • 6Replies
  • 1642Views