Dataport: Import file - Problem in Request Form

cosch1
Member Posts: 37
Hi experts,
i try to import a file as 'Gen. Journal Line'. It shouldn't be problem. I wan't to give over some variables in the request form.
The variable 'FileName' has the ID 1 so that it should work, but it doesn't.
NAV sais that the file couldn't be found so that I think, that the FileName wasn't given over?!
Please help......
Greatings from germany!
cosch1
i try to import a file as 'Gen. Journal Line'. It shouldn't be problem. I wan't to give over some variables in the request form.
The variable 'FileName' has the ID 1 so that it should work, but it doesn't.
NAV sais that the file couldn't be found so that I think, that the FileName wasn't given over?!
Please help......
Greatings from germany!
cosch1
0
Answers
-
FileName is a global variable you've created, right?
You have to tell NAV that this is the FileName for the dataport
CurrDataport.FILENAME := FileName0 -
crisnicolas wrote:FileName is a global variable you've created, right?
You have to tell NAV that this is the FileName for the dataport
CurrDataport.FILENAME := FileName
Thanks a lot for answering!
I've created it as a global variable, text length 250.
Now i told "him" that he's the FileName, but the result is the same....
Have you got another idea??????0 -
In which trigger have you put that piece of code?0
-
crisnicolas wrote:In which trigger have you put that piece of code?
JournalLine - OnPreDataItem()
FileName2 was only a test, but it doesn't work too.....0 -
is it some complicated filename & path?
Perhaps try for a test rename the file and put it in c:\
c:\test.txt
see if that works0 -
The dataport opens the specified file before that.... so, when it is trying to open the file, CurrDataport.FILENAME doesn't have a value yet.
You should place that code on the OnPreDataport trigger
You should also use CurrDataport.IMPORT to tell the dataport if it has to import or export the dataImport
Use this property to determine whether the dataport imports or exports data.
Applies to
Dataports
Settings
The Import settings are:
To...
Choose...
Import data to a C/SIDE table Yes (default)
Export data to an external file No0 -
crisnicolas wrote:You should place that code on the OnPreDataport trigger
Did you try that one? That's what needs to be done. Before the dataport begins processing ANYTHING it has to have a filename. That processing begins when OnPreDataport finishes.0 -
crisnicolas wrote:The dataport opens the specified file before that.... so, when it is trying to open the file, CurrDataport.FILENAME doesn't have a value yet.
You should place that code on the OnPreDataport trigger
You should also use CurrDataport.IMPORT to tell the dataport if it has to import or export the dataImport
Use this property to determine whether the dataport imports or exports data.
Applies to
Dataports
Settings
The Import settings are:
To...
Choose...
Import data to a C/SIDE table Yes (default)
Export data to an external file No
it sounds good, but -sorry - i don#t find the "OnPreDataport trigger"..... What's the way to find it????
I'm to stupid...... #-o0 -
cosch1 wrote:crisnicolas wrote:The dataport opens the specified file before that.... so, when it is trying to open the file, CurrDataport.FILENAME doesn't have a value yet.
You should place that code on the OnPreDataport trigger
You should also use CurrDataport.IMPORT to tell the dataport if it has to import or export the dataImport
Use this property to determine whether the dataport imports or exports data.
Applies to
Dataports
Settings
The Import settings are:
To...
Choose...
Import data to a C/SIDE table Yes (default)
Export data to an external file No
it sounds good, but -sorry - i don#t find the "OnPreDataport trigger"..... What's the way to find it????
I'm to stupid...... #-o
I found it!!!! It works!!!!! Many thanks to all!!!!
Greetings from germany!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