Hi all!
I have an Excel document with fields I have to import to Navision table. Actually in Excel document there are item numbers, item translation and language code. I have to import this document to table Item Translation.
But there is one problem I cannot deal with - some items has already their translations and I should not overwrite them! Furthemore, if an item has translation and the language code in Excel is the same as in item's translation in Navision - I should skipe dataport, but if Excel's translation for this item has different language code - i have to add it.
So, it seems, I have to programm some conditions in the dataport's OnBeforeImportRecord trigger. But how can I use current dataport's field for comparison with database table's field? :-s May be any other ideas? Please, help!!!
0
Comments
OnBeforeImportRecord()
INIT;
OnAfterImportRecord()
IF ItemTranslation.GET("Item No.","Language Code")THEN
CURRDATAPORT.SKIP;
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
AutoSave
AutoUpdate
AutoReplace
Properties
http://www.BiloBeauty.com
http://www.autismspeaks.org
Oh Right I didn't check the primary key, and it's not a table I have used much, on the develoment side !
Thanks 8)
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
I'm sorry, I don't understand. :oops: What variable? What type should be this variable? How can I get for comparison value of current record Language Code in Excel?
The fields "Item No.","Language Code" are filled in by the dataport. These you use to do a GET on "ItemTranslation". If the GET returns a TRUE, it means the record exists, and you can skip it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
But this fields allways are empty! I was looking in debugger..
BTW: did you fill in the fields in the dataport-fields (View=>Dataportfields)?
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!