Slice

Choose a subset of a list using start and end points.

Input Fields

  • list - the list you are starting with

  • start - the first item to include in the new list (where 0 is the first item)

  • end - the position to end (the item in this position won't be included in the new list); if you leave this field blank, the slice will extend to the end of the list.

Output Fields

  • slice - the new list (make sure you set this output list to be the same type as the input list)

Examples

If list is the list of numbers: [0,1,2,3,4,5] and start is 1 and end is 4 then slice is the list of number: [1,2,3]

Or, if you use start 2 and leave end blank then slice is the list: [2,3,4,5]

See Also

Functions in Workflows

About the elements of Okta Workflows