Dataport: How to read multiple files from given path

kash387kash387 Member Posts: 111
Hello Experts,

I have a requirement, where i have designed a dataport.
The dataport attributes:

Import: Yes
Request Form: No
File Format: Fixed

The path is taken from the field of the dataitem, the dataport will run from the form, and should automatically read all the .txt files from the given path and should import the data into the particular table.

I am not getting how to read more than one file using dataport????

Kindly Suggest Me What To Do...!!!!

Thanks and Regards,

Kashyap Pandya
Thanks,

Kashyap

Comments

  • kitikkitik Member Posts: 230
    You need to call the dataport as many times as files found.

    Create a report to loop the files and call the dataport each time.
    Use "File" as dataitem for your report.
    Filter the field "Path" to search inside the desired path
    Use the field "Is a file" to know if the element is a file or a sub-folder.

    Hope this works for you
    Salut!
    Laura Nicolàs
    Author of the book Implementing Dynamics NAV 2013
    Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.
Sign In or Register to comment.