List Operations

This function block allows users to perform various operations on lists, such as appending, filtering, and other manipulations. The selected methods can alter the input list and return results based on the specified action.

📥 Inputs

List A generic list input on which the selected operation will be performed. The type of elements in the list can vary.

📤 Outputs

The output type may vary based on the selected operation. Each method can yield different outputs as follows:

  • The transformed list after an operation (e.g., appended or sorted)

  • Individual elements based on specific commands (e.g., retrieved element, minimum value)

While specific output names vary depending on the operation selected, they are linked to the original List.

🕹️ Controls

Select a Method A dropdown menu that allows users to choose the operation they want to apply to the list. Available methods include APPEND, REMOVE, FILTER, GET, and many others.

Information Text This area displays contextual information about the currently selected method, guiding users on how to provide the necessary inputs.

🎨 Features

Variety of Operations The block supports a comprehensive list of methods to manipulate lists—ranging from counting items to filtering and sorting.

Dynamic Input/Output Management As the selected method changes, the block dynamically updates its input and output sockets according to the requirements of the chosen operation.

📝 Usage Instructions

  1. Connect Input List: Link a list to the List input socket.

  2. Select Operation: Choose the desired list operation from the Select a Method dropdown.

  3. Provide Necessary Inputs: Depending on your selected method, additional inputs may be required.

  4. Evaluate Block: Run the block to perform the operation. The result will be made available for further processing.

📊 Evaluation

Upon execution, this function block will process the input list based on the selected method and provide the corresponding outputs.

💡 Tips and Tricks

Using FILTER Method

When using the FILTER or FILTER_INV methods, ensure that your condition list matches the input list size.

Dynamic Input Validation

Always validate the input types and lengths to prevent run-time errors during list manipulations.

Using SLICE Method

When slicing, ensure your start and end indices are within the bounds of the list; otherwise, you'll run into errors.

Using GET Method

The GET method is useful for retrieving an element based on its index. Ensure that the index is valid to avoid errors.

🛠️ Troubleshooting

Method Not Available

If the desired method isn't available, ensure that you have the correct list input connected and that you're selecting from valid operations.

Index Error

If you receive an index error, check that your specified index is within the bounds of the list size. Adjust as necessary.

Empty List Output

If you're getting an empty list as an output, ensure that your operations are valid and that you have provided the necessary input data.

Last updated