What are derived attributes & how to use them?
On this page |
---|
Derived attributes are special type of attributes that are dependent on other attributes & constants. e.g. age is a derived attribute and can be calculated using today's date & the date of birth. UpRaise app supports these special type of attributes.
How does it work?
Unlike other attributes, these 'Derived attributes' cannot be assigned any value directly. A formula is associated with them based on which they derive the attribute value for every user, in real time. 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. As you would see in the screenshots below, a formula (with specific syntax) is associated with such attributes.
UpRaise app currently supports following two derived attributes.
Stay with us - Gives you the duration of the employee's association with your company (using current date & joining date)
Age - Derives a value that equals to the employee's age (using current date & date of birth)
Stay with us
Stay with us attribute is derived from joining date of employment details section. Stay with us attribute provides a value that is equal to the real-time tenure of the employee. If you look at the image below, the type of stay with us attribute is stated as 'derived' which is selected by default. You cannot make any changes in this attribute type and its formula. Let us see what formula is used to calculate the stay with our value.
Formula
DAYSDIFF([CurrentDate], att(9))
This syntax is specific to UpRaise.
How to find the attribute key?
Click on ‘Edit’ attribute from where you want to derive some value. On edit pop-up, you will see a number at the right top corner, that is the identifier used in the formula.
Final output on user profile
As per formula:
DAYSDIFF([CurrentDate], att(4435))
4 years, 5 months, & 24 days = ([02 February 2021] - (08 August 2019))
Age
The same formula is applicable to the age attribute, which is again a derived attribute from ‘Date of birth’ from ‘Personal details’ section.
Formula
DAYSDIFF([CurrentDate], att(4445))
This syntax is specific to UpRaise .
Attribute key taken from 'Date of birth' profile attribute.
Final output on a user profile
As per formula:
DAYSDIFF([CurrentDate], att(4445))
31years, 2 months, and 28 days = ([02 February 2021] - (04 November 1989))