How to get Item No. with Dataport

ebermejo
Member Posts: 6
Hello,
I need to import some item data with a Dataport but my file only contains the item "Description". How can I get the "No." of the "Description" from Item table using a Dataport?
Please help! [-o<
-e
I need to import some item data with a Dataport but my file only contains the item "Description". How can I get the "No." of the "Description" from Item table using a Dataport?
Please help! [-o<
-e
0
Comments
-
are any of the descriptions the same?
do the descriptions from your import file match exactly what you have in the system?0 -
The descriptions are unique but there will be possibility that they will not exactly match with the descriptions in our system. Some of our descriptions have comma (,) or dash (-) or letter "V" at end and they removed those in the file some times.0
-
When the data might be an issue, I tend to import the data into a new table which I create.
Creating fields that match the data i'm importing. Also keeping in mind, matching the type and size that is used in the item table. Then once you have this info in a new table you can add another field called NO_LOOKUP or something which is a flowfield. With calc formula like:
Lookup(Item.No. WHERE (Description=FIELD(Impdescription)))
where ImpDescription (imported description) is the name of your field in your new table holding the data.
Now when you go look at the new table, if the descriptions match, the NO_LOOKUP should show a value. The one's that don't have a value you know you have a description mismatch. and you can focus fixing those descriptions.
Once you have every line showing a value you can do many things to transfer the data to update the item table. ei/process report.
Of you can even copy your whole table into excel and create a new file to be imported that now has an item no.
another way would be import your file data into variables in the dataport. Using FIND to get a match.
item.setrange(description, ImpDescription);
if item.find('=') then begin
map field
map field
end else begin
currdataport.skip;
end;
but since you don't know which ones will match or not I would use the 2nd table and lookup.
That way I can see what's correct and what's not and review all these items FIRST before I start making changes to my current data.
You have to decide what's best for you.0 -
Let me try which way will work for us.
Thanks Harry for your help. :thumbsup: :thumbsup: :thumbsup:0 -
Savatage wrote:Of you can even copy your whole table into excel and create a new file to be imported that now has an item no.
:thumbsup:
In cases like this I always recommend doing it out side of Navision. Put the data in Excel and do it there.David Singleton0 -
Hi David,
Is there any particular reason why you would prefer this to be done outside Navision? Except the fact that the Navision database would remain un-affected and clean. However, if it is a development database, how does that matter? Also, a lot of Navision developers feel comfortable in working with Navision objects, rather than working outside.
Just a curiosity, to know what is/are the main reason(s) you would recommend such an activity.
Kind regards,
Chn0 -
You have many more tools in Excel. Most importantly this is NOT A DEVELOPER project, developers should not be involved. This is a user project and users know Excel.David Singleton0
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