.. _`Filter List Predicate`: .. _`org.sysess.sympathy.list.filterlistpredicate`: Filter List Predicate ===================== .. image:: filter_list.svg :width: 48 Filter a list using a configured item-based predicate. **Documentation** This node takes a predicate function (a function that returns True or False) from the configuration and uses it to decide which inputs to include in the output. The function is applied once for each input element in the list and for each element where the function returned True the element is also included in the output. Examples with port type == [table] and item type == table: Propagate tables with at least 10 rows to output:: lambda item: item.number_of_rows() >= 10 Propagate only non-empty tables:: lambda item: not item.is_empty() The name of the argument is not important. See https://docs.python.org/3/tutorial/controlflow.html#lambda-expressions for a description of lambda functions. Have a look at the :ref:`Data type APIs` to see what methods and attributes are available on the data type that you are working with. **Definition** *Input ports* :list: [] List *Output ports* :index: table Index :list: [] List *Configuration*: **Predicate filter function** (predicate) Filter function .. automodule:: node_filter_list .. class:: FilterListPredicate **Related nodes** * :ref:`org.sysess.sympathy.list.filterlisttable` **Example flows** * :download:`Predicates.syx `