Skip to main content

FIRST

Use the FIRST function to return the first item (position 1) from an Array.

Use​

FIRST( array )
Returns the first item from an array.

ParameterRequiredDescription
arrayYesany array to return the first item from

ReturnsAn item from the array matching the type of array

Examples​

Identifying the Lead Approver from a List​

In many workflows, a submitter might provide a list of multiple potential approvers in a Person Array. You can use the FIRST function in an Input Mapping formula to display only the primary contact at the beginning of the next form.

  • Formula: FIRST(@Trigger.out.SelectedApprovers)
  • Logic: This formula takes the array produced by the trigger step and extracts the individual listed at the first position.
  • Result: If the user selected three people—"Adele Vance," "Megan Bowen," and "Fred Blogs"—the function returns "Adele Vance".

Capturing the Starting Value for a Variable Update​

You can use the FIRST function within a Variable Update formula to store the initial entry of a data series. This is helpful if you need to compare later entries against the original starting point.

  • Scenario: A user submits a Number Array representing "Quarterly Projections." You want to update a variable called $InitialProjection with the very first number entered.
  • Formula: FIRST(@Trigger.out.Projections)
  • Logic: The function scans the numeric array and returns the value at the top of the list.
  • Result: If the array contains , the variable will be updated to 5000.