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