Populating my Database Entity with some data.

I just created a database entity but I can't find a way to enter some data in this database manually. Please how do I do this if I do not want to import an excel sheet? 

Thanks

Ilo Calistus wrote:

I just created a database entity but I can't find a way to enter some data in this database manually. Please how do I do this if I do not want to import an excel sheet? 

Thanks

Hi there Ilo

You can create a "INSERT" using the "Advanced SQL" or create one screen for create this records manually.


Regards.

Carlos Alfradique.


1- load a record with your Entity Type;

2- fill all fields you want to save in this variable;

3-use a CreateOrUpdateEntity Action to save into your database.


I hope it will helps you!

Thanks and Best Regards,

Nuno Pereira

Nuno Gonçalo Pereira wrote:

1- load a record with your Entity Type;

2- fill all fields you want to save in this variable;

3-use a CreateOrUpdateEntity Action to save into your database.


I hope it will helps you!

Thanks and Best Regards,

Nuno Pereira


Please I am new to Outsystems
How do I go about step 1? 

Carlos Alfradique wrote:

Ilo Calistus wrote:

I just created a database entity but I can't find a way to enter some data in this database manually. Please how do I do this if I do not want to import an excel sheet? 

Thanks

Hi there Ilo

You can create a "INSERT" using the "Advanced SQL" or create one screen for create this records manually.


Regards.

Carlos Alfradique.



I would have loved to create a screen for that but at this stage I might find it difficult because I'm new to OutSystems :) 

You can do something like this:

(Automatically through a form)


using form record
OR Manually:






I hope it will helps you!

Thanks and Best Regards,
Nuno Pereira

Ilo Calistus wrote:

Carlos Alfradique wrote:

Ilo Calistus wrote:

I just created a database entity but I can't find a way to enter some data in this database manually. Please how do I do this if I do not want to import an excel sheet? 

Thanks

Hi there Ilo

You can create a "INSERT" using the "Advanced SQL" or create one screen for create this records manually.


Regards.

Carlos Alfradique.



I would have loved to create a screen for that but at this stage I might find it difficult because I'm new to OutSystems :) 

Hi,

You can doubleClick on your flow "MainFlow" for example.

After drag and drop your entity for this flow twice.

First drag and drop:


Second drag and drop:

After you can use the "screen detail" for create your records.


Have a nice day.


Regards, 

Carlos Alfradique

Carlos Alfradique wrote:

Ilo Calistus wrote:

Carlos Alfradique wrote:

Ilo Calistus wrote:

I just created a database entity but I can't find a way to enter some data in this database manually. Please how do I do this if I do not want to import an excel sheet? 

Thanks

Hi there Ilo

You can create a "INSERT" using the "Advanced SQL" or create one screen for create this records manually.


Regards.

Carlos Alfradique.



I would have loved to create a screen for that but at this stage I might find it difficult because I'm new to OutSystems :) 

Hi,

You can doubleClick on your flow "MainFlow" for example.

After drag and drop your entity for this flow twice.

First drag and drop:


Second drag and drop:

After you can use the "screen detail" for create your records.


Have a nice day.


Regards, 

Carlos Alfradique

I was able to create that page but by entity has an image field on the table this field is missing on the form


Hi,

This post has a tutorial on how to upload an image.

By the way, it is bad practice to have a binary field in a "main" entity. It should be in a separate one.

https://www.outsystems.com/forums/discussion/36927/how-to-upload-an-image-with-outsystems-beginner/

Cheers

I think creating code for inserting data is cumbersome if you compare it to static entities. In static entities, you have the possibility to click on the property of the records and then starting adding records. On the database level, static entities and entities are not different from each other (that is that a static entity in the database is just a database table). So why not adding this possibility for entities too. 

The only difference is that static entity records are created on de QA & PRD environment when publishing from DEV to QA or from QA to PRD. This off cause will not be done for normal entities (non-static). You will have to write code or bootstrap an entity if you need data on QA or PRD.

It would be handy also if it is possible to specify that entities should also be published to QA and PRD with the data they have in DEV. Static entities can not change runtime. That doesn't mean that it should be impossible to transfer data from normal entities from DEV to QA/PRD.

Eduardo Jauch wrote:

Hi,

This post has a tutorial on how to upload an image.

By the way, it is bad practice to have a binary field in a "main" entity. It should be in a separate one.

https://www.outsystems.com/forums/discussion/36927/how-to-upload-an-image-with-outsystems-beginner/

Cheers

Yes and the reason for this is that if a CLOB or BLOB is in the main entity is that fetching a record from such a table is way slower that fetching the same record if it wouldn' had a CLOB or BLOB inside:


BLOB binary data.

CLOB text data that can be large (depending on database I believe) we are talking about text that might be longer than 2000 chars. This can happen if you have items with a short description and a long description. It's best to put this long description then also in a separate entity and use a one-to-one relationship.


Ronnie Verheij wrote:

I think creating code for inserting data is cumbersome if you compare it to static entities. In static entities, you have the possibility to click on the property of the records and then starting adding records. On the database level, static entities and entities are not different from each other (that is that a static entity in the database is just a database table). So why not adding this possibility for entities too. 

The only difference is that static entity records are created on de QA & PRD environment when publishing from DEV to QA or from QA to PRD. This off cause will not be done for normal entities (non-static). You will have to write code or bootstrap an entity if you need data on QA or PRD.

It would be handy also if it is possible to specify that entities should also be published to QA and PRD with the data they have in DEV. Static entities can not change runtime. That doesn't mean that it should be impossible to transfer data from normal entities from DEV to QA/PRD.

Hi Ronnie, 

You can use bootstrapping for this. Simply create a excel with the data you want in a table, bootstrap it and it will get automatically loaded in all environments the application is published in.

Please read the following link for more information: https://www.bing.com/search?q=outsystems+bootstrap&cvid=c7d714e969f44ea8a9e1d0a8b8b53146&FORM=ANNTA1&PC=U531

Kind regards,

Vincent Koning


Vincent Koning wrote:

Ronnie Verheij wrote:

I think creating code for inserting data is cumbersome if you compare it to static entities. In static entities, you have the possibility to click on the property of the records and then starting adding records. On the database level, static entities and entities are not different from each other (that is that a static entity in the database is just a database table). So why not adding this possibility for entities too. 

The only difference is that static entity records are created on de QA & PRD environment when publishing from DEV to QA or from QA to PRD. This off cause will not be done for normal entities (non-static). You will have to write code or bootstrap an entity if you need data on QA or PRD.

It would be handy also if it is possible to specify that entities should also be published to QA and PRD with the data they have in DEV. Static entities can not change runtime. That doesn't mean that it should be impossible to transfer data from normal entities from DEV to QA/PRD.

Hi Ronnie, 

You can use bootstrapping for this. Simply create a excel with the data you want in a table, bootstrap it and it will get automatically loaded in all environments the application is published in.

Please read the following link for more information: https://www.bing.com/search?q=outsystems+bootstrap&cvid=c7d714e969f44ea8a9e1d0a8b8b53146&FORM=ANNTA1&PC=U531

Kind regards,

Vincent Koning


Yes I am aware of it. Creating a bootstrap is anyway generating code. The way just editing like in static entities is just easier.