How to import file, but not based on primary key

hollydonuthollydonut Member Posts: 27
Hi all,
I have a table "My Table" with field A as primary Key, B, C , and D.
it has records :
A B C D
1 2 3 4
2 1 2 3


first i want to export field B, C, and D
After that i change the value of D in the export file and import it back to the table

How to do that??

Please help me, i'm new to navision.

Comments

  • vijay_gvijay_g Member Posts: 884
    hollydonut wrote:
    Please help me, i'm new to navision.
    Why don't you export Primary key field?
  • hollydonuthollydonut Member Posts: 27
    it is a requirement from my client.
    Actually this is for physical inventory. We want to export the item number, location, and qty calculated.
    After that user modify the qty based on real stock, and import it back to navision.
  • BeliasBelias Member Posts: 2,998
    why don't you use the physical inventory journal? it's easy.
    that said, i think you've a lot of customization in that area :-k
    now, please define what is your table, what are the fields and what is the primary key.
    If you don't have the PK in the exported file, there's no way to update fields in the table, because you cannot identify on which record you have to put the new values
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • hollydonuthollydonut Member Posts: 27
    actually what i want to export is the physical inventory journal from navision.
    what i want try to do is to export some fields to a text file, and that text file is used by some handheld device to calculate quantity of item on warehouse.
    And based on that device calculation i want to import it back to navision.
  • BeliasBelias Member Posts: 2,998
    you need to create a dataport with primary key fields + the fields you want to modify + additional fields you want for further information.

    PK fields
    -journal template name
    -journal batch name
    -line no.
    field(s) to modify
    -quantity calculated
    additional fields
    -item no.

    -run the dataport and export the data.
    -after the device reads the file, it has to modify the quantity field and then create a new text file with the modified quantity
    -run the dataport to import the new file
    -make sure to check if you need to run some validate trigger
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • carboncarbon Member Posts: 22
    An idea: export encrypted (coded) the primary key and unscramble PK before import. Quite complicated by maybe helpful.
Sign In or Register to comment.