---
description: Define functions for default values.
---

# Custom Attribute Functions

{% hint style="warning" %}
## Project Toolchain Usage

This feature makes use of these Project Toolchain APIs: **Middleware**, **Extensions**. Because of this usage, it defines the following modules:

### customAttributeFunctions

This module defines the following middleware and extensions identifiers that can be imported via Project Toolchain, along with their descriptions:

* **attributeFunctions** - Remove empty OR blocks from queries.
{% endhint %}

To enable this optional feature, add the `customAttributeFunctions` element to your [optionalFeatures](../../api-documentation/configuration-reference/optional-features) array, then use the generated middleware or extension inside of your code.

## Feature Effect

Whenever you attempt a create operation on a model, all fields that have a default function defined in the [defaultFunctions](../../api-documentation/configuration-reference/default-functions) configuration property will have their value set to the result of those functions.
