Livebase supports two types of derived attribute:
define a unique constraint ( Make Unique).define integrity constraints (make the attribute required).Because of this, it is not possible to perform some of the operations normally allowed with native attributes: Restrictions #ĭerived attributes depend on other attributes in the database. To make sure this doesn’t happen, simply set all necessary attributes to required.Ī quick way to do this is to right-click on the derived attribute, open the context menu, choose the Source attributes option, and tick as required all attributes present. If even one value is missing, the derived attribute will not be shown. ** Derived attributes and integrity constraints**Ī derived attribute can be calculated only for those records that have values for all attributes used as input by its expression. You can edit the expression used in any derived attribute by right-clicking on it and choosing Edit expression from the context menu. In the example in figure, the value of the /weight attribute on the Shipping_component class is calculated by multiplying the value of the quantity and /unit_weight attributes (circled in red) from it is then calculated the value of the /total_weight attribute on the Shipping class (circled in blue), which reports the total aggregate weight on all Shipping_component objects associated with a Shipping. If you select it, all attributes used to define it are circled in red vice versa, if you select an attribute involved in at least one expression, all derived attributes calculated from it are circled in blue. If you hover over a derived attribute, a tooltip shows the expression that defines it. In the attribute list of a class, derived attributes are denoted by the prefix /.
Derived Attributes Last updated: March 17, 2022, 5:09 PM UTCĪ derived attribute is defined from other attributes its value is not persisted in the database, but is computed at runtime. The same formula is applicable to the age attribute, which is again a derived attribute from date of birth in personal details section in the system. On edit pop-up, you will see a number at the right top corner, that is the identifier used in the formula.
#Mapublisher attribute table derived from permenant how to#
How to find the attribute key?Ĭlick on edit attribute from where you want to derive some value. Let us see what formula is used to calculate the stay with our value. You cannot make any changes in this attribute type and its formula. If you look at the image below, the type of stay with us attribute is stated as 'derived' which is selected by default. Stay with us attribute provides a value that is equal to the real-time tenure of the employee. Stay with us attribute is derived from joining date of employment details section. Stay with us - Gives you the duration of the employee's association with your company (using current date & joining date)Īge - Derives a value that equals to the employee's age (using current date & date of birth) UpRaise app currently supports following two derived attributes. As you would see in the screenshots below, a formula (with specific syntax) is associated with such attributes. Continuing with the example of 'age' - if an attribute 'date of birth' is already available it is easy to derive 'age' based on it & the current date. A formula is associated with them based on which they derive the attribute value for every user, in real time. Unlike other attributes, these 'derived attributes' cannot be assigned any value directly.
UpRaise app supports these special type of attributes. age is a derived attribute and can be calculated using today's date & the date of birth. Derived attributes are special type of attributes that are dependent on other attributes & constants.