27
Views
3
Comments
Database Service & Populate an entity
Application Type
Reactive, Service
Service Studio Version
11.54.6 (Build 62311)
Platform Version
11.21.0 (Build 39231)

Hello, so I'm new and I might be missing something extremely obvious but I don't understand why it doesnt work.So I have an app for an exercise, it has the main Module with the screens and a Database set up as a service, in that database I have 6 entities:Entity1 

Entity2

Entity3 

Entity4 

Entity5 

Entity6 

Entity 2 to 6 each has couple fields with data then Entity 1 has some fields like Name, Adress etc etc that I want to be populated with data from the other entities, I went to the diagram and dragged an arrow from Entity 1 into Entity 2,3,4,5,6 and in those entities it generated the relation , they have something like Entity1Id.

All other entities already have data but Entity1 remains empty.Now, Entity1 is going to be a table hence wanting for it to be populated dynamically, all other entities I dragged into the flow and it created the screens, filling their forms details and then going to their page all the data is correct, what I'm failing to understand is how do I populate the Entity1 fields with specific fields data from the other ones?Feel like I'm missing something extremely obvious here

2024-05-20 09-45-12
Jean Bastos


If I understand well, you will need to create an action with an aggregate(s) with all data you will need to add in Entity1

use a foreach to iteract thru all records and insert data on Entity1.

you can use a button or a timer to call this action.


it's not exacly same but you can use as reference... 

https://success.outsystems.com/documentation/11/developing_an_application/use_data/bootstrap_an_entity_using_an_excel_file/ 

2024-09-12 02-43-38
Deepsagar Dubey

Hi @Miguel Oliveira 

I am surprised why it's not working but make sure you have used these steps -

- click on mainflow, folder
- drag your entity1 there and i hope it'll create 2 screens for you,

If your screen created but you are not able to save data then try to debug it in your save screen action, also check if you have reference attribute in your entity then data is populated for this,

As well as check your entity1 primary id auto number should be set as Yes,

I hope it'll help you,

Thanks
Deep 

2023-10-21 19-42-11
Tousif Khan
Champion

Hello @Miguel Oliveira 

What I suggest you to do first is Complete the Guided path along with the Exercises

If you don't Understand the Concept and do drag and drop there is no use of it.

At least you must know what is happening behind the scene, and if you will create a screen by yourself instead of doing drag and drop you have an Idea of each and everything you will create there

There are courses for Reactive Web and Traditional Web developers, I suggest following it and completing it. Then we have some applications that you can build courses are there in the Guided path.

Thanks


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.