Hi all!
I want to import data from external file (.csv) to Post Code table. I want to skip all records that fields Code or City are empty, so I write such code in OnAferImportRecord trigger:
IF (PC.Code = '') OR (PC.City = '') THEN
CurrDataport.SKIP;
It seems ok, but when I run my dataport error occured:
"The field cannot be empty. Please enter a value".
I even try the same code in OnBeforeImportRecord, but nothing changed.
I thought that CurrDataport.SKIP omits current processed record and starts new one?
Any idea?
Best regards!!!
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
But I still get the error for "The field cannot be empty. Please enter a value".
Anyone can help? ](*,)
eg. if postcode = '' then
"Post Code" := addr4
else
"Post Code" := postcode;
IF (PCode='') OR (PCity='') THEN
CurrDataport.SKIP
ELSE
BEGIN
Postcode.Code:=Pcode;
Postcode.City:=PCity;
Postcode.INSERT;
END
Create the dataport with Pcode and Pcity in field designer.
Hope it works for you
Thank a lot.