Carrot reference
Functions

limit()

Returns a specified number of results from a provided list.

Syntax

limit(value)

  • value - the number of results to return.

Return type: List

Sample usage

{volunteers}.limit(4) returns the first 4 people from the volunteers list.

findHistoryValues( { checkinScore } ).limit(3).mean() returns the average of the first 3 values from the list returned from findHistoryValues( { checkinScore } ).

Supported data types

Input type

Return type

Logic

Number

List

Returns a specified number of results from a provided list.

Unsupported data types

Null

Unsupported data types return Null.



Updated 04 Oct 2023
Doc contributor
Did this page help you?