Creating entities dynamically

Creating entities dynamically

  

Hi

I have a requirement where we a user can define the table and attributes associated with it.

Is there any way in OutSystems to create entities dynamically.

Solution

Hello,

From inside OutSystems eSpace, no.

But if you have a connection with a user with correct permissions, you can do that through an Extension (C# or Java, depending on your stack).

But than, you will have to consume than through an extension also, as they will not be available in the OutSystems application.

So, it will not be nice...

afaik.

Cheers

Solution

Hi Antu,

Though Eduardo already gave you an answer (tl;dr: "no"), I'm trying to understand your requirement. Creating actual database tables and attributes should never be an end-user requirement, so what kind of users do you have? What is the goal of creating database tables?

Kilian Hekhuis wrote:

Hi Antu,

Though Eduardo already gave you an answer (tl;dr: "no"), I'm trying to understand your requirement. Creating actual database tables and attributes should never be an end-user requirement, so what kind of users do you have? What is the goal of creating database tables?

Hi Kilian

My requirement is very similar to one mentioned in 

https://www.outsystems.com/forums/discussion/33087/add-attributes-dynamically-to-the-entity/

I want to create my forms dynamically and later want to save the data filled in those forms in database.

But some how I am not able to resolve the dependency in dynamic form. There is one extension used in it. Not able to resolve it.


Eduardo Jauch wrote:

Hello,

From inside OutSystems eSpace, no.

But if you have a connection with a user with correct permissions, you can do that through an Extension (C# or Java, depending on your stack).

But than, you will have to consume than through an extension also, as they will not be available in the OutSystems application.

So, it will not be nice...

afaik.

Cheers

Thank you Eduardo.

Yes I wanted to know if it possible to create entities dynamically and have them in OutSystems application and use those as normal entity created during design time, and if its a good practice or not.


Hi Antu,

If you have dynamic forms, you'd still not want to create seperate database tables for each form (even if you could)! Instead, you'd create a database structure that can store the layout of the dynamically created form and any data that's input in them.

Thanks Kilian and Eduardo.

Understood the point.

Hi Antu,

There is an excelent forge component that implements dynamic forms. Take a look of the model it proposed to do that. Maybe you can collect some ideas to implements your model.

https://www.outsystems.com/forge/component/1999/dynamic-forms/


Best regards

Fabio Fantato