I am still trying to find a way to import a flat file into RTC (see my other thread) but in the meantime I'm thinking about converting my data to xml in order to import it. But I'm running into a problem with the XMLport. I need to do a little data manipulation but I can't find a way that NAV likes to refer to the data. Here is the top of my dataport fields list:
Node Name Node Type Source Type Data Source
------------ ----------- ----------- -----------
Root Element Text <Root>
Payroll Journal Line Element Table <Payroll Journal Line>(Payroll Jouirnal Line)
JournalTemplateName Element Field <Payroll Journal Line>:: Journal template Name
LineNo Element Field <Payroll Journal Line>:: Line No.
DocumentType Element Field <Payroll Journal Line>::Document Type
......
I want, let's say, to evaluate DocumentType like this
IF DocumentType = 'Payment' THEN "Document Type" := 1
ELSE "Document Type" := 0;
I have tried putting this in the PayrollJournalLine - Import::OnBeforeInsetRecord() and in the DocumnetType - Import::OnAfterAssignField() tiggers, but it won't compile, telling me that DocumentType is an unknown variable.
If someone could point me towards the proper way to refer to this field, I'd be very grateful...
Answers
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The XMLPort is working at this point (putting records into the Payroll Journal Line table), but I still can't adjust values. If I try this I get a compile error "unknown variable 'Payroll Journal Line' " This gets "unknown variable 'Normal Sign' " Trying the syntax from the dataport gride, I get "< must not be the first word in a sentence"
So now that I can refer to the data value, how can I refer to the table/field??
I don't know why it doesn't work that way but i would try to rename the Datasource Variable to something without spaces : PayrollJournalLine(Payroll Journal Line)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
For the table, the format is "<tablename>", thus:
Cheers everybody....