Skip to main content

FIND

Use the FIND function to locate one text value within a second text value, and return the number of the starting position of the first text value from the first character of the second text value.

Use

FIND( find_text, within_text, [start_num] )
Finds the position of one text value within another (case-sensitive).

ParameterRequiredDescription
find_textYesthe text to find
within_textYesthe text to search for find_text
[start_num]Nospecifies the character at which to start the search (starting from 1)

ReturnsNumber

Examples

Identifying a Separator Position

You can use FIND to determine the location of a specific character, such as a hyphen or a slash, in a text string. This is useful in Input Mapping or Variable Update formulas when you need to parse data later.

  • Formula: FIND("-", @Trigger.out.OrderCode)
  • Logic: This formula searches for the hyphen character ("-") within the "OrderCode" output from the trigger step.
  • Result: If a user submits an Order Code of "ORD-5521", the function returns 4. This numeric value tells the system exactly where the separator is located, which could then be used by other functions like LEFT or MID to extract specific portions of the code.

Searching from a Specific Starting Point

The FIND function includes an optional third parameter, start_num, which allows you to skip a certain number of characters at the beginning of the string before starting the search.

  • Formula: FIND("App", @Trigger.out.Description, 10)
  • Logic: This formula searches for the text string "App" within a "Description" field but ignores the first 9 characters, starting the search only from the 10th character.
  • Result: If the Description text is "Standard Approval for Apps", the function would skip the first "App" found in "Approval" and return 23, which is the starting position of the second "App".

Key Technical Notes:

  • Case-Sensitivity: The FIND function is case-sensitive. If you search for "go" in "Google," the function will not find a match because the casing does not align perfectly. If you need a case-insensitive search, you should use the SEARCH function instead.
  • Positioning: All character positions in GoApprove formulas start from 1.