Dataport for EMPLOYEE table not working

lavanyaballurgi
Member Posts: 235
Well the subjects says it.... my dataport for 4 fields in EMPLOYEE table is not working... I know im missing something silly so please point it out for me.
DATAITEMS
{
{ PROPERTIES
{
DataItemTable=Table2000000026;
AutoSave=No;
AutoUpdate=No;
DataItemTableView=SORTING(Number);
OnBeforeImportRecord=BEGIN
gco_no := '';
gtx_firstname := '';
gtx_lastname := '';
gtx_email := '';
END;
OnAfterImportRecord=VAR
lrc_Employee@1000000000 : Record 5200;
BEGIN
CLEAR(lrc_Employee);
lrc_Employee.INIT;
lrc_Employee.VALIDATE("No.",gco_no);
lrc_Employee.VALIDATE("First Name",gtx_firstname);
lrc_Employee.VALIDATE("Last Name",gtx_lastname);
lrc_Employee.VALIDATE("E-Mail",gtx_email);
lrc_Employee.INSERT(TRUE);
END;
}
FIELDS
{
{ ; ;gco_no }
{ ; ;gtx_firstname }
{ ; ;gtx_lastname }
{ ; ;gtx_email }
}
}
}
REQUESTFORM
{
PROPERTIES
{
Width=9020;
Height=3410;
}
CONTROLS
{
}
}
CODE
{
VAR
gco_no@1000000002 : Code[10];
gtx_firstname@1000000003 : Text[30];
gtx_lastname@1000000004 : Text[30];
gtx_email@1000000008 : Text[80];
BEGIN
END.
}
}
DATAITEMS
{
{ PROPERTIES
{
DataItemTable=Table2000000026;
AutoSave=No;
AutoUpdate=No;
DataItemTableView=SORTING(Number);
OnBeforeImportRecord=BEGIN
gco_no := '';
gtx_firstname := '';
gtx_lastname := '';
gtx_email := '';
END;
OnAfterImportRecord=VAR
lrc_Employee@1000000000 : Record 5200;
BEGIN
CLEAR(lrc_Employee);
lrc_Employee.INIT;
lrc_Employee.VALIDATE("No.",gco_no);
lrc_Employee.VALIDATE("First Name",gtx_firstname);
lrc_Employee.VALIDATE("Last Name",gtx_lastname);
lrc_Employee.VALIDATE("E-Mail",gtx_email);
lrc_Employee.INSERT(TRUE);
END;
}
FIELDS
{
{ ; ;gco_no }
{ ; ;gtx_firstname }
{ ; ;gtx_lastname }
{ ; ;gtx_email }
}
}
}
REQUESTFORM
{
PROPERTIES
{
Width=9020;
Height=3410;
}
CONTROLS
{
}
}
CODE
{
VAR
gco_no@1000000002 : Code[10];
gtx_firstname@1000000003 : Text[30];
gtx_lastname@1000000004 : Text[30];
gtx_email@1000000008 : Text[80];
BEGIN
END.
}
}
0
Answers
-
Deleted earlier post.0
-
ANy other solution?0
-
What do you mean by not working?
Are you getting any error message?
Can you show us sample record from your txt file?0 -
I mean after importing it shows the progress bar and everything is ok. But when I open EMPLOYEE table its empty... here is a row of my csv file
EMP/0185,Rohit,Kumar,Rohit.Kumar@gmail.com0 -
try with
"EMP/0185","Rohit","Kumar","Rohit.Kumar@gmail.com"0 -
great...it works... so this was the issue... is it default option or I screwed up something??0
-
Its Default option..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