This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Import CSV

Andre - Tuesday, May 31, 2016 12:09 PM:

Hello, I have a doubt about how I create for example a module to import a .CSV file to the program.

For example,and I would like to Add to Aras using a button and selecting the file.

It is possible?



stevestojanovski - Tuesday, June 7, 2016 9:50 PM:

Yes this is possible to do.  The basic idea could be as follows:

1) Create a new Action that has a client method that displays a open file browser.  The open file browser allows the user to select a file from their local computer.  The client method uploads the file to the Aras file vault

2) Then, the client method calls a server method (that you create) passing in parameters to the server method that is the ID of the file item that was uploaded.

3) The server method (using C#/VB at your disposal) can checkout the file from the Aras file vault to a temp folder on the server.  Then you can open the .CSV file using standard .net methods, read the CSV file, use the Aras AML/API to create your items in from the data in the file.

4) When the server method is completed, you return an "OK" result item back to the client if everything ran without errors.  If errors occur, return the error back to the client method.  Then the client method can check the result from the server method and display a message to the user about success or failure.