FirstOrEmpty

This Flow Script tutorial explains how to use the FirstOrEmpty function with syntax and examples.

Description

The FirstOrEmpty function returns the first record in the table. If the table is empty, an empty record is returned (i.e. all fields contain nothing).

Syntax

‌The syntax for the FirstOrEmpty function is:

FirstOrEmpty(table)

Parameters

table - the table with the data from which the first row is to be taken.

Returns

‌The FirstOrEmpty function returns a record.

Applies To

Flow 6‌.13

Example

Let's look at some FirstOrEmpty function examples and explore how to use the FirstOrEmpty function.‌

FirstOrEmpty(colors)
Result: Id: C1, Color: red - as Record

FirstOrEmpty(emptyTable)
Result: Id: "",Color: "" - as Record

FirstOrEmpty( table(a, b))
Result: [a: "", b: ""] - as Record

Last updated