> For the complete documentation index, see [llms.txt](https://docs.goril.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goril.app/main-pages/custom-code/custom-functions.md).

# Custom Functions

Create a custom function reusable throughout the application.

## Creating a Custom Function

In order to create a **Custom Function** follow the next steps :&#x20;

* Click on the **Add** button and select **Functions** in the opened list
* Set the **Name** of your function on the right properties panel
* Add a **Tag** to group your custom functions
* Choose if your function should be **Async** or not
* Add any **Parameters** you need
* Choose the **Return Type**&#x20;
* Write your code in the central editor
* Save by clicking on the top right button **Save**

<figure><img src="https://2361990732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FruhMqqOvKXgZPke0Ehds%2Fuploads%2FvwSGjXo2ABfGvFZ7NKeZ%2FCapture%20d%E2%80%99e%CC%81cran%202023-05-24%20a%CC%80%2015.55.24.png?alt=media&amp;token=3ec76435-ce95-44e7-b23e-7d225c52d14e" alt=""><figcaption><p>Example of a custom function that add two numbers and return the result as a string</p></figcaption></figure>

## Use a Custom Function

<figure><img src="https://2361990732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FruhMqqOvKXgZPke0Ehds%2Fuploads%2Fagym3VMYEaD4D3ZZczkp%2Fusefunctions.gif?alt=media&amp;token=beae15fc-0f28-4702-beea-a47c3dd5e69f" alt=""><figcaption><p>Example of use of a custom function that increment by 1 an observable on button click</p></figcaption></figure>
