.. _`Filter List with Table`:
.. _`org.sysess.sympathy.list.filterlisttable`:
Filter List with Table
``````````````````````
.. image:: filter_list.svg
:width: 48
Filter a list using a column from an incoming table.
Documentation
:::::::::::::
This node takes a table on the upper port and use it to filter the list on
the lower port. The table must contain a single column which should be at
least as long as the list on the lower port. Lets call it the
filter column. Then for each item in the incoming list the corresponding
row of the filter column is inspected. If it is True (or is considered
True in Python, e.g. any non-zero integer or a non-empty string) the item
is included in the filtered list. And vice versa, if the value in the
filter column is False (or is considered False in Python, e.g. 0 or an
empty string) the corresponding item is not included in the filtered list.
Definition
::::::::::
Input ports
...........
**filter** table
Filter
**in** []
List of items
Output ports
............
**out** []
Filtered list of items
Configuration
.............
**Filter column** (filter)
Select the column which holds the filter.
Leave empty to use first column, this is DEPRECATED and will cause an ERROR starting with version 7.0.0.
Related nodes
.............
* :ref:`org.sysess.sympathy.list.filterlistpredicate`
Examples
........
* :download:`Predicates.syx `
Implementation
..............
.. automodule:: node_filter_list
:noindex:
.. class:: FilterListTable
:noindex: