---
schema_version: "1"
id: 09b0d28c26568ab459cf4ce72f32437e19d8e82dcc2e3a489b4a75bc9800bd43
title: Building Formulas for Flows
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/composer/ms_composer_custom_expression_editor.md
canonical_url: https://docs.mulesoft.com/composer/ms_composer_custom_expression_editor
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 5ec79f44e4e56b0e3cfd2e57c761feb1b10dfc5eacfa3bde4f3bcc42e716f934
description: MuleSoft Documentation Site
latest: true
---
---
product: Composer
---

# Building Formulas for Flows

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Manipulate data in Composer by building _expressions_ and applying _functions_. Using the **Custom
Expression Editor**, create expressions that include functions and mathematical operators. Use the
editor also to truncate words, capitalize phrases, and set the date.

When building formulas for a flow, keep in mind that:

- You can nest functions and use the input parameters of another function call for your function.

- Composer functions used in Composer are built using
  [DataWeave](https://docs.mulesoft.com/dataweave/2.3/dw-operators).

- Composer functions treat empty spaces as empty space characters in a formula.

## Access the Custom Expression Editor

To access the **Custom Expression Editor**:

1.  From the **Composer Flows** tab, open a flow.

2.  Click **Edit**.

3.  In an action field, in a value in the query builder, or in the value of an **If/Else Block**
    control, select **Custom Expression fx** from the drop-down menu.  
    The **Custom Expression Editor** appears.

## Add a Custom Expression to an Action

When adding a custom expression, place the cursor over elements in the **Custom Expression Editor**
window to trigger context popovers containing helpful suggestions and in-app support.

To add a custom expression to an action:

1.  In the **Custom Expression Editor** left pane, click one of the following tabs:

    1.  **Function**, to view or search for a function

    2.  **Data**, to view or search for a field or data pill

    3.  **Operator**, to view or search for an operator

2.  Select the available functions, fields, data pills, or operators for your custom expression from
    the left pane.  
    Your selections appear in the **<Field Name>** box in the right pane. The syntax of your custom
    expression is validated automatically.

3.  If you want to reuse the expression in the **<Field Name>** box in another field, copy it.

4.  After the custom expression is created and validated, click **Apply**.

5.  Click **Save**.  
    The custom expression is added to the field.

## Edit a Custom Expression

To edit an existing custom expression in an action:

1.  From the **Composer Flows** tab, open a flow.

2.  Click **Edit**

3.  In an action field containing your custom expression, click the pencil icon.  
    The **Custom Expression Editor** appears.

4.  In the **<Field Name>** box in the right pane of the **Custom Expression Editor**, either select
    and delete the existing custom expression or place your cursor where you want to add items from
    the left pane.

5.  In the left pane, select from the available functions, fields, data pills, or operators.  
    Your selections appear in the **<Field Name>** box in the right pane. The syntax of your edited
    custom expression is validated automatically.

6.  After your custom expression is edited and validated, click **Apply**.

7.  Click **Save**.  
    Your custom expression is edited.

## Delete a Custom Expression

To delete an existing custom expression in an action:

1.  From the **Composer Flows** tab, open a flow.

2.  Click **Edit**

3.  In an action field containing a custom expression, click the X icon.  
    The custom expression is deleted from the field.

4.  If your implementation requires this field to contain a value, either add a new custom
    expression or select a value from the drop-down menu.

5.  On the **Flow Details** page, click **Save**.  
    The custom expression is deleted. If your environment requires a value in the custom expression
    field, your addition or selection is saved.

## See Also

- [Mulesoft Composer: Overview](https://docs.mulesoft.com/composer/ms_composer_overview)

- [MuleSoft Composer: Getting Started](https://docs.mulesoft.com/composer/ms_composer_prerequisites)

- [Composer Connector Reference](https://docs.mulesoft.com/composer/ms_composer_reference)

- [Knowledge Articles](https://help.salesforce.com/s/)
