0

Functions of Buttons

I have a table that has a button and they duplicate one of the sub tables for the next day. need a formula for this button, for duplicating all the data of the main table.

let c := (create 'GM TABLE');
let t := this;
c.(DATE := t.DATE + 1);
for i in t.AllTables do
    let d := duplicate(i);
    d.('GM TABLE' := c)
end;
closeRecord();
popupRecord(c)

 

And the second question, there are two tables, Tables1 and Tables2, with identical data. I need to create a button for deleting a record, I go to one of the tables and open the record there, there is a button that deletes this record, but I need to add a function to delete a single record in another table. Both tables subtables of one main table Table12

let result := dialog("Warning", "Are you sure?", ["Yes", "No"]);
if result = "Yes" then
    alert("Deleted");
    delete this
else
    alert("Canceled")
end

 

I found this, you need to add the function of deleting a record in table2

Regards

8replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 4 mths agoLast active
  • 8Replies
  • 80Views
  • 2 Following