Lists
Blocks for working with arrays, collections, and dynamic sequences of values.
Lists Create Empty
Block
Description
Returns a list, of length 0, containing no data records
Lists Create With
Block
Description
Create a list with any number of items.
Params
- ADD0: Any
- ADD1: Any
- ADD2: Any
Lists Repeat
Block
Description
Creates a list consisting of the given value repeated the specified number of times.
Params
- ITEM: Any
- NUM: Number
Lists GetIndex
Block
Description
Returns the item at the specified position in a list. #0 is the first item.
Params
- VALUE: Array
- MODE: Dropdown
- get
- get and remove
- remove
- WHERE: Dropdown
- #
- # from end
- first
- last
- random
- AT: Number
Lists Length
Block
Description
Returns the length of a list.
Params
- VALUE: String, Array
Lists IsEmpty
Block
Description
Returns true if the list is empty.
Params
- VALUE: String, Array
Lists IndexOf
Block
Description
Returns the index of the first/last occurrence of the item in the list. Returns -1 if item is not found.
Params
- VALUE: Array
- END: Dropdown
- first
- last
- FIND: Any
Lists GetSublist
Block
Description
Creates a copy of the specified portion of a list.
Params
- LIST: Array
- WHERE1: Dropdown
- #
- # from end
- first
- AT1: Number
- WHERE2: Dropdown
- #
- # from end
- last
- AT2: Number
Lists Split
Block
Description
Split text into a list of texts, breaking at each delimiter.
Params
- MODE: Dropdown
- list from text
- text from list
- INPUT: String
- DELIM: String
Lists SetIndex
Block
Description
Sets the item at the specified position in a list. #0 is the first item.
Params
- LIST: Array
- MODE: Dropdown
- set
- insert at
- WHERE: Dropdown
- #
- # from end
- first
- last
- random
- AT: Number
- TO: Any
Lists Sort
Block
Description
Sort a copy of a list.
Params
- TYPE: Dropdown
- numeric
- alphabetic
- alphabetic, ignore case
- DIRECTION: Dropdown
- ascending
- descending
- LIST: Array
Lists Reverse
Block
Description
Reverse a copy of a list.
Params
- LIST: Array