Links

Lists Blocks

Overview

The list blocks allow you to work with lists or arrays of elements. This includes operations like adding or removing items from a list, accessing specific items by their position, and sorting items. List blocks allow you to manipulate and manage data, making it easier to store, organize, and process multiple pieces of information.

List of Specific Items

This block allows you to define the items you want in your list and the specific order in which you want them arranged. Click the gear icon to add or remove list items.

Empty List

This block allows you to create an empty list.

Mathematical Values and Random Item

This block returns a random item or performs mathematical calculations on a list, including sum, minimum, maximum, average, etc. Returns the result of the chosen operation on a list of numbers. Returns "NaN" if the operation cannot be performed on the given list of values.

Length of List

This block analyzes a list and returns the length of a list as a number. Click the gear icon to add or remove list items.

Shuffle List

This block generates a copy of a list with the items shuffled in a random order.

Does List Contain

This block checks if a list contains a given item. Returns true or false.

Find First/Last Occurrence

This block returns the position of the first or last occurrence of an item in a list, where the index of the first item is 1. Returns 0 if the item is not in the list.

Get, Get and Remove, or Remove

Each item in a list has an index number. The first item in a list is 1, the second is 2, etc. This block allows you to get, get and remove, or remove:
  • An item at position X
  • An item X items from the end of the list
  • The first item
  • The last item
  • A random item

Insert At or Set

These blocks allows you to modify a list. You can insert an item at the specified location or set the item at the specified location to the new value.

Sort List

This block allows you to sort a list alphabetically or numerically, ascending or descending. This can be especially helpful if you import a list from a data source.

Get Sub-list

This block returns a sub-list of items between two positions in a longer list.

List of Numbers from [X] to [Y] by [Z]

This block creates a list between two numbers with a defined increment. For example:
  • A list of numbers from 1 to 5 by 1 is [1, 2, 3, 4, 5].
  • A list of numbers from 2 to 10 by 2 is [2, 4, 6, 8, 10].

Create List with Item Repeated [X] Times

This block creates a list of a given item repeated a specified number of times.

Make List from Text or Make Text from List

This block allows you to create a list from text or a text from a list and define the delimiter (e.g. ",").

Is Empty

This block checks whether or not a list is empty and returns true or false.