# Using Formula Editor

Formula Editor is used to build and check formulas. It is available in 2 views: Old (classic) and New (based on Salesforce Lightning interface) depending on place where it is called at.

### Old View

Old view Formula Editor is displayed in dialog popups where some dashboard elements are configured.

To show Formula Editor toggle Merge Field Picker on and click "Open Formula Editor" button:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FNz8Za74Ld7v8FZZ2J92W%2Ffile.excalidraw.svg?alt=media&#x26;token=1429996b-1a38-41e6-9efa-ee3879cd6cde" alt="" class="gitbook-drawing">

The Formula Editor will be shown as a modal window inside the dialog popup.

Edit a formula in a Formula field; use merge field constructor to select and paste [merge fields](https://docs.flexikanban.ai/standard-kanban/tools/using-merge-field-picker) and [functions](https://docs.flexikanban.ai/references/functions) there.

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2F8wzNOOY9jFCPMvQzFnjJ%2Ffile.excalidraw.svg?alt=media&#x26;token=275aee94-f925-41f3-8076-2ab4547d3486" alt="" class="gitbook-drawing">

{% hint style="info" %}
To use the functions or calculations inside of inputs, they should be wrapped in formula expression: `FORMULA[%formula_contents%]`. The proper warning will be shown when a $Functions is selected in "Context Object" picklist of merge field constructor.
{% endhint %}

Type a necessary formula in the Formula field.

Click "Copy To Clipboard" button to copy the formula.

Click "Check Syntax" button to validate formula syntax. If all is good, a proper message will be shown:

<figure><img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FCiJ5bTV0SziVZBkc98C9%2Fimage.png?alt=media&#x26;token=92d69713-a4ad-4066-bbf2-a1d05939af2c" alt=""><figcaption></figcaption></figure>

Check "Calculate Formula" checkbox to show more useful options:

<figure><img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2F3nNzGcN89UHchXvN2A1L%2Fimage.png?alt=media&#x26;token=42f43b74-c82e-46bc-ae5d-f1e49c19e152" alt=""><figcaption></figcaption></figure>

A "Source Objects" JSON will be shown with default stub values in the proper field. Change these values to ones you want to test or debug formula with, and click "Calculate" button. Result of formula evaluation will be shown in the "Formula Result" field:

<figure><img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FxFEfqrlHK0LEyJWKsEXx%2Fimage.png?alt=media&#x26;token=06f1bec9-6f23-4b30-97ae-d4104b59cd51" alt=""><figcaption></figcaption></figure>

Click "Apply" button to paste a formula into a Merge Field Picker (if it was opened previously):

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FmSzN8VaY6DbaTp7hiBY8%2Ffile.excalidraw.svg?alt=media&#x26;token=398e6886-e9f0-4a05-8c39-dd08e68e1b22" alt="" class="gitbook-drawing">

### New View

A new view of Formula Editor can be found in dashboard elements configuration popups, e.g. in Card Compact Layout configuration window. Click "Formula Editor" button to show it:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FJQnFFhmLTyD4xMz83YhA%2Ffile.excalidraw.svg?alt=media&#x26;token=24a5a7e8-4fc6-418d-857a-d86aeb53a19e" alt="" class="gitbook-drawing">

This view of Formula Editor has the same basic features as an old view. Also you can:

* copy formula to clipboard
* click "Apply" to paste formula to the field where you've clicked "Formula Editor" button
* check Formula syntax
* evaluate formula:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FAzhWtdy2phoQ5Z1tdNna%2Ffile.excalidraw.svg?alt=media&#x26;token=af3e3170-8b6f-442b-af64-04b0395cc39e" alt="" class="gitbook-drawing">


---

# 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.flexikanban.ai/standard-kanban/tools/using-formula-editor.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.
