how to add data during xmlport import?

jr_macarilay
Member Posts: 29
Hi,
i want to add additional data during import while using xmlport. the import runs fine w/o any errors but when i check the table, the additional data that i want to add is not included. can someone check if im doing something wrong? thanks
here's a cut from my xmlport code.
i want to add additional data during import while using xmlport. the import runs fine w/o any errors but when i check the table, the additional data that i want to add is not included. can someone check if im doing something wrong? thanks
here's a cut from my xmlport code.
Header - Import::OnBeforeInsertRecord() sa_header.VALIDATE(location,xLocation); sa_header.VALIDATE(brand,xBrand); sa_header.VALIDATE("load date",xDate);
0
Comments
-
Did you try by shifting the code in
Header - Import::OnAfterInsertRecord()
It may be validating location before importing and some code may be revalidating the location code while importing..0 -
Hi mohana,
i tried putting the code under Header - Import::OnAfterInsertRecord() but the additional data is still not inserted0 -
Do you want to modify sa_header record?
where is sa_header.MODIFY?0 -
-
Where did you get the exact record of sales audit header?
are you technical person?0 -
its from a txt file that im trying to import using an xmlport. im trying to add additional data that is not included in the txt file.0
-
mohana_cse06 wrote:are you technical person?
You should get the record to add additional information..
as shown in screenshot you are trying to add additional information to a record which is not existing..
you have to find the appropriate record and add additional information..0 -
im sorry but i dont think we are understanding each other.
i am a technical person but as i've said, i am new to navision. i just want to add additional data during my xmlport import. for example:
the text file contains something like:
[transaction type], [transaction date], [transaction time]
the table i created have these fields:
[type] [date] [time] [location] [brand]
as you see, there is no location and brand data on the txt file, and thats what im trying to add. if that makes sense.0 -
i understood your requirement correctly..
from where did you get location and brand data?
To get the record you should code something like this.sa_header.RESET; sa_header.SETRANGE(transaction type,transaction type); sa_header.SETRANGE(ransaction date,ransaction date); sa_header.SETRANGE(transaction time,transaction time); IF sa_header.FINDFIRST THEN BEGIN sa_header.VALIDATE(location,xLocation); sa_header.VALIDATE(brand,xBrand); sa_header.VALIDATE("load date",xDate); END:
Contact your senior for help..0 -
the location and brand are from user input which are stored in the variables xLocation and xBrand.0
-
above code worked or not?0
-
i have a question, why do i need to put SETRANGE?
from what i understand, xmlports read text files per line right?0 -
offf....
let me explain..
you have 5 lines in table and you are inserting line 6 in to table from xmlport..
you imported line 6..and you want to modify line 6..
As per your first code..it dont know which line it has to modify..
You have to get line 6 by coding with setrange..0 -
im trying to import to an empty table @_@0
-
still you need to find the first line, right?
Please contact your senior..0 -
that's what i wouldve done the first time, except i dont have a senior right now that's why im asking here and hoping someone can help me.
i dont even understand why im having a hard time accomplishing this in navision. this wouldve been easy in vb and sql @_@ oh well0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions