sublist
FEEL built-in function · FEEL list functions
sublist(list, start position, length?)
Returns the slice of the list starting at start position, running to the end or for length elements.
Parameters
| Parameter | Type | Description |
|---|---|---|
| list | list | the source list |
| start position | number | 1-based start; negative counts from the end |
| length | number | maximum elements to return (optional) |
Examples
sublist([4, 5, 6], 1, 2)
[4, 5]
Try it ↑
sublist([4, 5, 6], -1)
[6]
Try it ↑
Edge cases and null handling
Part of FEEL list functions: how positions, nulls and single values behave across all of them, aggregating over lists of contexts, and every function side by side.
Related functions
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).