> For the complete documentation index, see [llms.txt](https://docs.flexikanban.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flexikanban.ai/components/actions-action-groups/basics/working-with-functions.md). Agents can also search and read this documentation through its [MCP server](https://docs.flexikanban.ai/~gitbook/mcp).

# Working with Functions

### How to use Function(s) <a href="#how-to-use-function-s" id="how-to-use-function-s"></a>

The Flexi Kanban functions is very powerful and flexible tool that may help to build your complex logic and get rid of custom code in your application. You can use functions in the Flexi Kanban Dashboards, Forms and Actions.&#x20;

The Flexi Kanban application provides its own [library of functions](https://docs.flexikanban.ai/references/functions.md), with the ability to extend the library with client custom functions. &#x20;

To use the function(s) or expression in your component configuration you have to cover the whole expression into "FORMULA\[]", except the places where the type of content is "Formula" (for example Action conditions).

```
Examples: 
1 + 2 = FORMULA[1 + 2]
The current year is "FORMULA[FORMAT({$system.Date}, 'yyyy')]"
```

### How to register custom Function <a href="#how-to-register-custom-function" id="how-to-register-custom-function"></a>

The Flexi Kanban application allows you define your own functions.&#x20;

To define your own function go to Setup->Custom Code->Custom Settings->KanBan Config List->Manage and click "New" button.

![](https://media.screensteps.com/image_assets/assets/006/511/079/medium/Custom_Function_2.png)

Here you can configure the custom function properties:

* Name  - custom function name. Should not contain spaces & special symbols. Preferable the upper case.\
  Example: CALCULATETOTAL
* Option 1 - apex class name that implements FLX\_KB.KanBanInterfaces.FunctionInterface interface and stores function code.\
  Example: MyCustomFunctionClass
* Option 2 - definition of the formula that will be shown as a formula example expression.\
  Example: CALCULATETOTAL(column\_id)
* Option 3 - category to put the formula in.\
  Example: Numeric
* Value - must be "Function"

And click "Save" button.

The configuration should looks like:

![](https://media.screensteps.com/image_assets/assets/006/511/095/medium/Custom_Function.png)

After that you will be able to find this function in all application formula builders and use it.

**The example of code that represents the custom function:**

{% code fullWidth="false" %}

```
public class MyCustomFunctionClass implements FLX_KB.KanBanInterfaces.FunctionInterface {
    public Object executeFunction(String name, List<Object> parameters, Map<String, Object> context) {
        return null;
    }
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flexikanban.ai/components/actions-action-groups/basics/working-with-functions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
