List Operations
This function block provides a collection of common list operations (create, modify, query and combine lists). Selecting a method updates the visible sockets so you only see the inputs and outputs required for that operation. It is designed for non-programmers and works like a small toolbox for list manipulation inside your flow.
π₯ Inputs
The block adapts its sockets depending on the selected method. Common input socket names you may see:
List- Generic list input (many methods accept this).Element- Single element to insert or remove.Index- Position index for get/insert/pop/set operations.List1andList2- Two lists to combine (for extend).Data ListandCondition List- Inputs for filtering by boolean mask.List (String)- A comma-delimited string to create a list from text.StartandEnd- Indexes for slicing.List(s)- A list of lists to pair-merge.
(Available inputs will change automatically when you pick a different operation.)
π€ Outputs
Outputs depend on the chosen method. Typical outputs include:
List- Resulting list after an operation.Filtered List- Result after applying a filter.Size- Length of the list.Element- Single element returned by get/min/max.Index- Index of a found element.Sliced List/Sorted List/Reversed List- Variants for transformation methods.List(paired) - Combined list when using pair operation.
The block will show the correct output sockets for the operation you selected.
πΉοΈ Controls
Select a method- Dropdown to choose the list operation (examples below).Info(visible when present) - Short help text explaining requirements for the selected method.
Common selectable methods in the dropdown:
appendextendinsertremovepopfilterfilter_inverselenminmaxindexsortreversesumgetslicecreatesetpair
π― Features
Dynamic sockets: inputs and outputs update automatically to match the selected operation, keeping the interface simple.
Clear guidance: when an operation needs specific input formats (for example a boolean mask for filtering), an explanatory text appears.
Safe operations: common user errors (like out-of-range indexes or missing elements) produce readable error messages to guide corrections.
String-to-list creation: create lists from comma-separated text without writing code.
π Usage Instructions
Choose the operation with
Select a method.Connect the required input sockets shown (the block will display only needed sockets).
Provide values or connect other blocks to supply inputs.
Read outputs from the shown output sockets. Use them further in your flow.
Examples:
To add an item, pick
appendand provideListandElement. Output will be the updatedList.To create a list from text, pick
createand feed a comma-separated string toList (String).To filter a data list, pick
filterand supplyData Listplus aCondition Listof booleans.
π Evaluation
When evaluated, the block performs the chosen list operation and returns the outputs corresponding to that operation. If inputs are invalid (for example a bad index or mismatched sizes for filtering), the block displays an informative error and returns a safe value where applicable.
π‘ Tips and Tricks
Use
Createtogether withString Inputto build lists from text fields (handy for quick test data).Clean up results with
Exclude Nonesafter operations that may produceNonevalues.Use
Get Elementto safely extract an element from the list for other processing blocks.For batch workflows, combine with
Batch Processing,DebatchorGet Batch Sizeto handle many lists or list-of-lists efficiently.Use
FilterorFilter Inversewith a boolean mask produced by other analysis blocks (for instance from measurement or condition checks).When you need to save or log list results, connect outputs to
Data to JSON,CSV ExportorImage Logger(for cases where list data corresponds to image capture events).Use
Debug InputorShow Image(if your list items are images) to inspect intermediate outputs during setup.Use
Pairto horizontally merge multiple equal-sized lists (useful to build tabular data).
Suggested combinations with other function blocks:
If you build a list of detections, use
Object Detection, then collect and manage them usingList Operationsand store results viaCSV Export.Create lists with
Createfrom text, filter with outputs of logical checks likeEquals/Greater, then inspect withDebug Input.When working with image batches (lists of images), use
Batch Processing+Image Resizeon each item, and collect results withList Operationsmethods likeappendorextend.
π οΈ Troubleshooting
Operation mismatch: If sockets seem missing, check
Select a methodβ sockets update to match the selected operation.Out of range index: For operations using an
Indexprovide a value between 0 and the list size minus one.Filter size mismatch: For
filterandfilter_inverseensureData ListandCondition Listare lists of equal length (the block will report mismatches).Non-list input: Several methods expect a list. If you receive errors, verify the upstream output is actually a list or use
Createto build one.
If you need help deciding which method to use, pick Select a method and read the on-screen Info text that appears for operations with special requirements.
Last updated
Was this helpful?