Loading
Salesforce now sends email only from verified domains. Read More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Flow Formula Considerations

          Flow Formula Considerations

          When you create a formula resource or add validation to a screen input component, understand the behavior of formulas in flows.

          Formula Functions

          • These functions aren’t supported in a flow formula.
            • GETRECORDIDS
            • IMAGE
            • INCLUDES
            • PARENTGROUPVAL
            • PREVGROUPVAL
            • PRIORVALUE
            • REQUIRE SCRIPT
            • VLOOKUP

            For a complete list of operators and functions for building formulas in Salesforce, see Formula Operators and Functions by Context.

          • In a flow, the CONTAINS function checks all characters within its parentheses. For cross object field references, CONTAINS works like it does in the rest of Salesforce. It checks only the first 250 characters in the reference.

            Here’s an example. varContract refers to a record variable that contains the values of a contract record. This formula expression checks only the first 250 characters.

            CONTAINS({!varContract.Account.Description}, "description")

            This formula expression checks all characters in the field.

            CONTAINS({!varContract.Description}, "description")

          Flow Data in Formulas

          • References to global variables in formulas aren’t validated.
          • To reference a platform event in a formula, pass the event data into a record variable in the Wait element. Then reference the appropriate field in that record variable.
          • To evaluate a null field value as a zero value, use the BLANKVALUE function. For example, to evaluate a null value for the NumberOfEmployees field as a zero value, use BLANKVALUE(NumberOfEmployees, 0).

          Formulas that Reference a Resource on the Same Screen

          • If a formula is used to validate user input and it references a resource on the same screen element as the formula, some formula functions aren't supported. For example, REGEX. For a list of supported formula functions, see Reactive Screen Flow Formula Operators.
          • If a formula references a resource on the same screen element as the formula, it will honor the percentage. For example, if the value is 100, it is evaluated to 1.00. Otherwise, it doesn’t honor the percentage. For example, if the value is 100, it’s evaluated as 100.

          Gotchas

          • A flow formula can contain up to 3,900 characters.
          • When you paste a formula, make sure that the apostrophes and quotation marks are straight ('') and not curly (‘’). Otherwise, you get a syntax error when you save the flow.
          • Record formula fields are evaluated in flows exactly as they’re evaluated in Salesforce Classic. When a record formula field checks NOT(null/blank), it evaluates to FALSE.

          Errors

          A formula returns null if an error occurs when the expression is evaluated, such as:

          • The value that the formula returns doesn’t match its data type.
          • The formula contains an unsupported function.

            For example, if your formula resource has a data type of Number, the output must be numeric.

          If a flow contains an invalid formula resource, you can’t activate the flow. If a Display Text screen component contains an invalid formula resource, the flow displays an empty string at run time.

           
          Loading
          Salesforce Help | Article