# Formulas

## The power of Ruby

When a formula field is available, OpenCutList gives you access to a list of variables where you can play with their data by writing [Ruby](https://www.ruby-lang.org/fr/documentation/) code.

Each variable as a [Data Type](/features/parts/formulas/data-types.md) that allows you to access some properties and functions.

## Formula field

The formula field is a text form field where you can write Ruby code. To display the list of available first  level variables, type the **@** character. The list of variables may differ from form to form.

<figure><img src="/files/QchppdUAoMsxELIQTMpp" alt=""><figcaption></figcaption></figure>

With formulas you can perform various things, from concatenate or decorate texts (string) ...

<figure><img src="/files/TJ0riEtFtbmp26xRL5zs" alt=""><figcaption></figcaption></figure>

... to more complex operations with conditional structures.

<figure><img src="/files/L5YqiUig7mjkZcivwSik" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opencutlist.org/features/parts/formulas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
