0
Transfer all info on table to another table (script don't work)
let me := this;
let myA := first(select 'wbs by Documents' where 'Name Document' like me.'Name Document');
if myA = null then
if dialog(" Waiting Answer", " Document NOT found. ¿Include it now ??", ["Yes", "CANCEL"]) = "Yes" then
for loop1 in select 'Bach Documents' do
let newA := (create 'wbs by Documents');
newA.('Name Document' := me.'Name Document');
newA.(Hours := me.Hours);
alert(" The Document has been INCLUDED..")
end
else
alert(" The document was not created, it is DUPLICATED ")
end
else
alert(" The Document already exists It cannot be INCLUDED.")
end
I need to copy all Documents on 'Bach Documents' to 'wbs by Documents' but The script don't work.
7 replies
-
is one of the if statement returning the wrong answer?
or is the for loop part not working?
-
The loop part is working fine. There are three records in the 'Bach Documents' table and it creates three records in the 'wbs by Documents table.
Ninox is naming all the new records the same name as the current record you are on.
newA.('Name Document' := me.'Name Document')
Notice you are using the me variable and that points to the current record. What do you think you should change that to?
Content aside
- Status Answered
- 1 yr agoLast active
- 7Replies
- 89Views
-
2
Following