0

Move record.
Is it possible to move a record to another table depending on a selection field ie yes. And remove from original table.
Thank you.
Like Follow
6replies
-
Alan, Create a new database with two tables named: Table1 and Table2. Include two text fields named: firstname and lastname (in both tables). Add a 'Yes / No' field with the default name to Table1. Create sample records in Table 1. Select "Yes" in one or more of the records. Then add the following code to a "Move Records" button in Table1:
for i in select Table1 where 'Yes / No' = true do
let k := i.this;
let f := i.firstname;
let l := i.lastname;
delete (select Table1 where Id = k);
let t := (create Table2);
t.(firstname := f);
t.(lastname := l)
end