How to import a bundle of attachments into the entity

May you advise how to migrate/import the a bundle of files extracted from the legacy system into entity? There is some plug-ins modules to do uploading files for UI in the Forge. However, i cannot find any way to import files like bootstrap excel file import.

Hi Jessica,

If you have excel files that have just a sheet that represents one table with no foreign key relations than you can just drag and drop it on the data tsb in service studio. All code is schafollded to load the spreadsheet data into an entity. The name of the column headings will be attribute names, the name.of the sheet with de data will be the entity name.

Alternative ways on how to use or customize the excel import features of OutSystems are described in the solution of the following post;

https://www.outsystems.com/forums/discussion/26480/import-excel-file-and-update-my-table-records/

Any other more advanced import scenario like

Related tables, 

data transformation, 

large data sets 

Will require some.custommsllution that you have to develop yourself.

If you can access to the OutSystems database by means of an external database management system, you could explore how to use it for your ETL 

Regards,

Daniel


Daniël Kuhlmann wrote:

Hi Jessica,

If you have excel files that have just a sheet that represents one table with no foreign key relations than you can just drag and drop it on the data tsb in service studio. All code is schafollded to load the spreadsheet data into an entity. The name of the column headings will be attribute names, the name.of the sheet with de data will be the entity name.

Alternative ways on how to use or customize the excel import features of OutSystems are described in the solution of the following post;

https://www.outsystems.com/forums/discussion/26480/import-excel-file-and-update-my-table-records/

Any other more advanced import scenario like

Related tables, 

data transformation, 

large data sets 

Will require some.custommsllution that you have to develop yourself.

If you can access to the OutSystems database by means of an external database management system, you could explore how to use it for your ETL 

Regards,

Daniel


Thank, Daniel.

Please let me depict my issue further.

I have enclosed my sample excel file for importing into entity.

In the excel, there has 2 columns, photo and cv, containing the attachment's location path. I want to upload these files into the entity as well.

Any ideas?



Hi,

Yes that would be possible but requires coding.

You could still schaffold the basic outline of your solution by dragging your spreadsheet to the data tab in Service Studio. Then you need to add some extra coding to the generated timer code and an extra entity Attachment that can store the Picture and CV document in a binary attribute. On the Schafolled entity you can add two foreigh keys to the new Attachment entity PictureId and CVDocumentId.

However before you go start coding, you have to ask yourself one important question?

Are the file paths in your spreadsheet accessible from within OutSystems? If you are running on Premise solution of OutSystems this might be no problem, but running OutSystems in the cloud will not automatically be able to access a network server mapped to your X:\ 

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi,

Yes that would be possible but requires coding.

You could still schaffold the basic outline of your solution by dragging your spreadsheet to the data tab in Service Studio. Then you need to add some extra coding to the generated timer code and an extra entity Attachment that can store the Picture and CV document in a binary attribute. On the Schafolled entity you can add two foreigh keys to the new Attachment entity PictureId and CVDocumentId.

However before you go start coding, you have to ask yourself one important question?

Are the file paths in your spreadsheet accessible from within OutSystems? If you are running on Premise solution of OutSystems this might be no problem, but running OutSystems in the cloud will not automatically be able to access a network server mapped to your X:\ 

Regards,

Daniel

Hi Daniel

Thank for your advice.

I have a reference OML to import excel coding but I don't know how to upload file into binary attribute if i work under on-premise solution. Any sample OML to teach me?

BTW, is it possible to connect the backend outsystem entity/database via ODBC to upload file?




Solution

As you work on premise it should be possible with database management tool or etl software to upload data into outsystems entities.

To import files use file system Forge component. It has a server action to read a file as a binary.

Solution

Daniël Kuhlmann wrote:

As you work on premise it should be possible with database management tool or etl software to upload data into outsystems entities.

To import files use file system Forge component. It has a server action to read a file as a binary.

Thank Daniel.