---
title: "Create a function Attribute"
slug: "create-a-function-attribute"
updated: 2026-03-10T09:16:31Z
published: 2026-03-10T09:16:31Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.lightico.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a function Attribute

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]
> 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**](/v1/docs/add-conditional-workflow-elements#function) performs the calculation during the Workflow and writes the result to a selected Attribute.

---

## Create a function Attribute

To create a function Attribute:

1. Go to **Attribute mapping**.
2. Click **Create new**and select**Function**.
3. Enter an **Attribute name** and **Attribute label**.
4. Select the **Function Type**.
5. Configure the function, see below.
6. 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.

![](https://cdn.document360.io/473bb8c5-ff1b-4930-8109-2321ac6ab967/Images/Documentation/image(423).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.

![](https://cdn.document360.io/473bb8c5-ff1b-4930-8109-2321ac6ab967/Images/Documentation/image(424).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.

![](https://cdn.document360.io/473bb8c5-ff1b-4930-8109-2321ac6ab967/Images/Documentation/image(426).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]
> Note
> 
> Function Attributes generate values automatically and cannot be manually edited by users.
