Good afternoon,

How do you sync or copy an entity from an external database into an OS entity so that it can be utilized (joined, etc.) with entities that are built in the OS database? 

The application we are working on is an Operations Report where we have users enter information on a monthly basis. This information is then going to be utilized alongside info from our external database to display project progress. Our external database is not one that we manage, we cannot add new entities to it, but we need to pull up-to-date project information from this database and display it in the report. 

We have connected the database with no problem and can access and use the data. Our issue comes up when we try to connect information that we are collecting in an OS entity with an entity from our external database. It is my understanding that this is not possible. 

I have gone through the online trainings and guided paths for architecture, but have not been able to find clear direction on how to achieve what I'm trying to do. Any help or guidance is appreciated. 


Hi Kate,

The simplified answer is that you query the data from the external database table and then iterate through it, creating records in an OutSystems entity you created with a layout that is similar to the external database's table.

To do this in an efficient way, however, you you will to keep track of the moment you last synched the tables, so you can filter the data and sync only data that's new or was updated.

You may also want to try creating a structure with the layout you want for the joined data, querying both databases separately and using two foreach cycles, along with the ListFilter system action to fill in the structure with data.