How do we use Static entity in different ways in building application.

Hi,

Can some one please explain the importance of having static entity and the usage in application.

Thanks,

Saicharan

Hi Sai,

In simple word Static entity as name suggest is static you can't change the value.Its like table with static data or say table with hard code values.

You can create static entity and can add static attributes similar like entity but here all the records are static with Id,label,order and active flag you can use it in OS.


In Application you can use static entity based on your requirement like,Can user list of drop down values, Save any hard code value in database table by Id,label. etc.


Thanks,

Manish Pandey

Hi sai charan,

Static entity are basically the set of values that are pre-defined and not going to change later in your application. (in c# you can compare them similar to enums) . For example days in a weeks (sun, mon, tue etc) , Gender (male , female ) etc can be defined as static entity. 

There can be a situation where the value will be same for every pages in your application so instead of hard coding them there , you can create a static entity and use them. 

[To Be Noted : In backend outsystems actually creates table for your 'Static Entity' but they are kept static thought the application and are not allowed to be change or update (You will not find any create or update action within the entity definition , only get function will be there. )  ]

Hello Sai, 

Static entities are enums stored in the database. 

You can think of them as Global constants that are related, for eg (CountryCodes,  Statuses etc).

They are available at design time and can be used directly in your business logic. 

Check the documentation below 

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Modeling_Data/Static_Entity

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Data_Modeling/Static_Entities

Doing the below web training will help clear your concepts. 

https://www.outsystems.com/learn/paths/2/becoming-a-web-developer/

Regards

Amal 

Amal Raj wrote:

Hello Sai, 

Static entities are enums stored in the database. 

You can think of them as Global constants that are related, for eg (CountryCodes,  Statuses etc).

They are available at design time and can be used directly in your business logic. 

Check the documentation below 

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Modeling_Data/Static_Entity

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Data_Modeling/Static_Entities

Doing the below web training will help clear your concepts. 

https://www.outsystems.com/learn/paths/2/becoming-a-web-developer/

Regards

Amal 


Hello Sai, 

Did  the above responses help you with your query ?

If yes, please mark the one that helped you as a solution. 

If no, revert with what else you need. 

Regards