Last

The Last() function returns the last item in a list or concept set.

For (persistent) lists it now also accepts a list as parameter - only to be used in Kubernetes Runtime 4.2 (not in Shared Europe, Shared APAC or any private runtime 4.1.xxx).

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the last item in the given list or concept_set.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Possible fault message in expression editor: Invalid call to a function: parameter mismatch at position(x,y): Last

This could mean that there is no field of list used, but only the (reference to a) list.

For Runtimes Shared EUR, Shared APAC and Private Clouds v4.1.xx, the Last function needs a field from list where filter construction, or if you only want to get the last row of a list, use RowId([list]) of [list] where [filter].

For Runtimes 4.2, the Last function now also accepts a List as parameter - no longer requiring a specific field.

Syntax

Last(List(values) or [field] of [list] or [List])

Last(List("A", "B", "C")) =>Result: "C"

Last(RowId([list]) of [list] where HasValue([field in list])) =>Result: last row in the indicated list where a certain field has a value

Last([DateModified] of [list] where HasValue([field in list])) =>Result: last DateModified value in the indicated list where a certain field has a value

Last([list] where HasValue([field in list])) =>Result: last row in the indicated list where a certain field has a value - ONLY Runtimes 4.2 and up!

Parameters

Name
Type
Required
Description

values

list or a concept_set

☑️

a collection of values or elements of the same type, or a list of fields from a (persistent) list.

Last updated