Automatically Calculating Information Values
To be able to automatically calculate a value a calculated information can be used.
A calculated information is an information that deduces its value automatically from other information values available elsewhere in the case. A calculated information can therefore never be edited by a user. It is recalculated each time something changes in the information values it uses as source.
In order to be able to calculate a value, a RuLa expression needs to be provided which describes the calculation. The result of the calculation has to follow the type (text, number, date,...) of the information since it will be its new value. Inside the expression the reference
selfis used to access information of the instance the calculated information is connected to.
It is usually good practice to collect the first and last name of a person in separate fields. However, they are often used together as full name. It is therefore a good idea to have an information that calculates the full name like so:
if self.type_of_person = legal_person
elif self.type_of_person = natural_person
then CONCAT (self.last_name, ", ", self.first_name)
Now, full_name can be used whenever a person's name is required. In case the person is a legal person the entity name will be returned. If the person is a natural person then full_name will be a concatenation of last and first name.
Last modified 11mo ago