---
schema_version: "1"
id: 3adca49858b30ff59e48b742747255637bbfcc620ed037324ea63c86f14ecbc7
title: Formula Resource
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_resources_formula.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_resources_formula.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 554cc30a897159fb83060b77940a310e7e27f59d8faaedb02808ef87ce030ca1
description: Calculate a value when the formula is used in the flow.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Formula Resource

Calculate a value when the formula is used in the flow.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note When using a choice in a formula, the choice's value is used in all formula resources except text formulas. In text formulas, the choice's label is used.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:31%">
          <col style="width:69%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d86372e65">Field</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d86372e68">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e65 ">
              <strong class="uicontrol">API Name</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e68 ">
              <span>The requirement for uniqueness applies only to
                elements within the current flow. Two elements can have the same API name,
                provided they're used in different flows.</span>
              <span>An API name can include underscores and alphanumeric
                characters without spaces. It must begin with a letter and can’t end with an
                underscore. It also can’t have two consecutive underscores.</span>
            </td>

          </tr>
          <tr class="">
            <td data-label="Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e65 ">
              <strong class="uicontrol">Description</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e68 ">Helps you differentiate this formula from other resources.</td>

          </tr>
          <tr class="">
            <td data-label="Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e65 ">
              <strong class="uicontrol">Data Type</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e68 ">The data type for the value returned by the formula. You can’t change the data type of
              a previously saved variable.</td>

          </tr>
          <tr class="">
            <td data-label="Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e65 ">
              <strong class="uicontrol">Decimal Places</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e68 ">
              <p>
                <span>Controls the number
                  of digits to the right of the decimal point up to 17 places. If you leave this field blank
                  or set it to zero, only whole numbers appear when your flow runs.</span>
              </p>
              <p style="margin-bottom:0;">
                <span>Available only when the data type is Number or Currency.</span>
              </p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e65 ">
              <strong class="uicontrol">Formula</strong>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d86372e68 ">
              <p>The formula expression that the flow evaluates at run time. The returned value must be
                compatible with <strong class="uicontrol">Data Type</strong>. </p>
              <p style="margin-bottom:0;">Some formula functions aren’t supported
                in Flow Builder.</p>
            </td>

          </tr>
        </tbody>
      </table>

#### See Also

- [Formula Operators and Functions by Context](https://help.salesforce.com/s/articleView?id=platform.customize_functions.htm&language=en_US)
- [Which Functions Aren’t Supported in Flow Formulas?](https://help.salesforce.com/s/articleView?id=platform.flow_considerations_design_formulas.htm&release=264.0.0&type=5 "When you create a formula resource or add validation to a screen input component, understand the behavior of formulas in flows.")
- [Flow Resources](https://help.salesforce.com/s/articleView?id=platform.flow_ref_resources.htm&release=264.0.0&type=5 "Each resource represents a value that you can reference throughout the flow.")
- [Creating Flow Formulas with Flow Formula Builder](https://help.salesforce.com/s/articleView?id=platform.flow_formula_builder.htm&release=264.0.0&type=5 "You can use Flow Formula Builder to build an expression in Formula-type resources or in the Collection Filter or Start elements of a record-triggered flow. To build your expression, select from a list of functions and operators. To catch errors as you work, check the formula syntax for each expression.")