Automatically creating records after found set
I've got 2 tables - 'Products' where all product names saved to this table & 'Prices' from which I want to extract product names to the 'Products' table if there are no record found.
Here are my scripts:
Allow User Abort [On]
Set Error Capture [Off]
Go to Layout ["Prices"]
Go to Record/Request/Page [First]
Set Variable [$SupplierID;Value:Prices::SupplierID]
Set Variable [$ProductName;Value:Prices::ProductName]
Set Variable [$Barcode;Value:Prices::Barcode]
Set Variable [$Price;Value:Prices::Price]
Go to Layout ["Products"]
Enter Find Mode 
Set Field [Products::SupplierID]
Set Field [Products::Barcode]
Perform Find 
Set Field [Products::SupplierID;$SupplierID]
Set Field [Products::ProductName;$ProductName]
Set Field [Products::Barcode;$Barcode]
Go to Record/Request/Page [Next; Exit after last]
However, the cursor kept blinking & nothing happened for long time. I got no choice to press ESC key. Where did my script go wrong?
Thanks for the help!