0

Code help please

Hi folks I keep getting symbol expected:end at line 9,column 9 any ideas please.  Thanks

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)
openTable("Table2");
alert("Records with ""Yes"" have been moved to Table2")
end

7replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • looks like you are missing the (semi colon ;): at the end of line 8

    Like
    • Faldo
    • Faldo
    • 1 yr ago
    • Reported - view

    Ok thanks will try later.

    Like
  • Hi Faldo

     

    This code can be shortened to

     

    for i in select Table1 where 'Yes / No' = true do
       let t := (create Table2);
       t.(
          firstname := i.firstname;
          lastname := i.lastname
       );
       delete i
       end;
    openTable("Table2");
    alert("Records with ""Yes"" have been moved to Table2")

     

    Regards John

    Like
    • Faldo
    • Faldo
    • 1 yr ago
    • Reported - view

    Yes thankyou very much working fine.

    Like
    • Faldo
    • Faldo
    • 1 yr ago
    • Reported - view

    Ok John will try too later on.

    thank you.

    Like
    • Faldo
    • Faldo
    • 1 yr ago
    • Reported - view

    That's brilliant deletes old records too.  Thank you.

    Like
    • Faldo
    • Faldo
    • 1 yr ago
    • Reported - view

    Hi how could I display something to say not deleted if they choose no.

    Like
Like Follow
  • 1 yr agoLast active
  • 7Replies
  • 222Views