OutSystem Entities and Variables

 Hello Everyone,

I hope you all are doing well. I am very happy to see your response and hopefully now you are having interest in my blogs to learn more about OutSystems. So today's topic is OutSystem Entities and the variables used in OutSystems. If some of you are aware about the database then you must know about the Entities. Entities are the tables in which we can create our data, retrieve our data, update our data and delete our data according to the requirement.

 Each new instance or record of an Entity is inserted as a row on the corresponding table .A different Entity should be created for each application concept 

 An Entity is defined by fields called Attributes 

As we can see from above image that we can add entity directly by clicking on database.


Entity data is stored in its attributes.

Each Attribute

 ● Is a Column on the respective database Table

 ● Must be one of the Basic Types Every Entity is created with a special Id Attribute

 ● Primary key in the database

 ● Supports relational database operation

                                                      

After creating entity we have to add its attributes so by above image it is clear that it is so easy to add attribute. After this there is a concept of Static entity

Static Entity is the entity that can give the predefined values to our entity. Each value of a Static Entity is a Record Static Entity records can NOT be created, updated, or deleted; only retrieved.

Static Entities Records start with 4 automatically created attributes -

○ Id

 ○ Label 

○ Order 

○ Is Active 

 These attributes can be changed or deleted and others can be added. Static Entity Records can be referenced by Record name and it is known at design time. Record name can be used in place of the Static Entity’s Identifier.

This is all about Entities and next topic is Variables. Variables are the locations in the memory which can hold data.

● Hold data of a particular data type 

● Can be any data type Variables are defined and exist in a particular scope 

● Values can be accessed and modified in that scope 

● If execution leaves that scope, the variable is destroyed Variables can be: 

  •  Input Parameters 
  •  Output Parameters 
  •  Local Variables
Input Parameters: It passes a value into its parent’s scope from the outside scope It can be set as Mandatory. It basically requires that the parameter must have a value assigned it The variable is destroyed when execution leaves the scope of the parent element.
Output Parameters: It returns a value from inside its parent’s scope to the outside scope. A value must be assigned to the Output Parameter inside its scope. The variable continues to exist in the outside scope even after its parent element’s scope is gone.
Local Variables: It exists exclusively within the scope of its parent element and can be assigned and used “locally” inside that scope. The variable is destroyed when execution leaves the scope of the parent element.

So this is all about entities and variables which are used in OutSystems. I hope you have understood upto this part because from next part it is going to be interesting. If you have any doubts you can comment and i will resolve your issues. See you soon!!!

Thankyou

Comments

Popular posts from this blog

OutSystem-Low Code Platform

Web Development-Overview