Importing CSV file into Nav. Table

kolaboy
Member Posts: 446
Hi experts,
I am trying to import a CSV file from excel into navision table. Its is importing but its taking the records of only the last records for a particular Employee no. The employee no. is the primary key.
I have more than one records for each employee no, but the import is taking only one of these records mostly the last record and leaving the rest of the other records out i.e not imported.
How can i import everything into the table. Is there anything i am leaving behind?
Here is my dataport:
Thanks
[/code]
I am trying to import a CSV file from excel into navision table. Its is importing but its taking the records of only the last records for a particular Employee no. The employee no. is the primary key.
I have more than one records for each employee no, but the import is taking only one of these records mostly the last record and leaving the rest of the other records out i.e not imported.
How can i import everything into the table. Is there anything i am leaving behind?
Here is my dataport:
Any Idea please.OBJECT Dataport 50017 Test
{
OBJECT-PROPERTIES
{
Date=20/11/07;
Time=16:19:02;
Modified=Yes;
Version List=;
}
PROPERTIES
{
FileFormat=Variable;
FieldStartDelimiter=None;
FieldEndDelimiter=None;
FieldSeparator=,;
OnPostDataport=BEGIN
MESSAGE('Import complete');
END;
}
DATAITEMS
{
{ PROPERTIES
{
DataItemIndent=0;
DataItemTable=Table5207;
}
FIELDS
{
{ 0 ;5 ;"Employee No." }
{ 6 ;7 ;"From Date" }
{ 15 ;7 ;"To Date" }
{ 25 ;5 ;Quantity }
}
}
}
REQUESTFORM
{
PROPERTIES
{
Width=9020;
Height=3410;
}
CONTROLS
{
}
}
CODE
{
BEGIN
END.
}
}
Thanks
[/code]
0
Answers
-
kolaboy wrote:
The employee no. is the primary key.
That's your problem.Tomas,
Dynamics NAV Enthusiast0 -
Entry No should be in the primary key of Table 5207. "Employee Absence"
Each Record should have a different "Entry No."0 -
I have created and entry no. but still not importing all.
Anything wrong
Thanks0 -
Hi experts,
I have solved the problem now. Its working the way i wanted it to be.
I actual make use of the Entry nos. thanks for all your suggestions
Thanks0 -
When creating dataports it's always a good idea to:
-go to object designer->design->"table"->view->keys
& take a look at the primary0 -
Thanks for that advice Savatage.0
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