A function Attribute automatically generates its value based on a calculation or rule defined in the Attribute itself. Instead of entering a value manually, the value is calculated using other Attributes or system data.
Function Attributes are useful when you want values to be generated automatically—for example, combining multiple fields into one value, generating an ID number, or calculating the difference between two dates.
Note
Calculations in Lightico can be configured in two places. A Function Attribute performs the calculation within the Attribute itself and stores the result in that same Attribute. A function step in a Workflow performs the calculation during the Workflow and writes the result to a selected Attribute.
Create a function Attribute
To create a function Attribute:
Go to Attribute mapping.
Click Create new and select Function.
Enter an Attribute name and Attribute label.
Select the Function Type.
Configure the function, see below.
Click Save.
Once created, the Attribute value will be generated automatically based on the function configuration.
Function types
When creating a Function Attribute, you can choose from several function types.
Concatenate
The Concatenate function combines multiple Attributes and text strings into a single value.
.png)
This is useful for creating formatted values such as full names or reference strings.
Example:
Mrs. @first_name @last_name
In this example, the value of the Attribute will combine the text Mrs. with the values of the first_name and last_name Attributes.
Random Number
The Random Number function generates a random number within a defined range. You can optionally add a prefix and suffix.
.png)
Settings include:
Prefix – text added before the number
Min number – the minimum number that can be generated
Max number – the maximum number that can be generated
Suffix – text added after the number
Example result:
AA123ZZ
This can be useful for generating reference numbers, IDs, or tracking codes.
Date Difference
The Date Difference function calculates the difference between two date Attributes.
.png)
You select two date fields, and the function calculates the time difference between them.
Typical use cases include:
Calculating the number of days between two events
Determining the duration of a process
Measuring time between submission and approval dates
When to use a function Attribute
Use a Function Attribute when:
The value should always be calculated automatically
The logic should be defined once and reused
The value is needed in multiple places (Workflows, documents, integrations)
Examples include:
Creating a full name from first and last name
Generating unique reference numbers
Calculating time differences between dates
Note
Function Attributes generate values automatically and cannot be manually edited by users.