PadCodedocs

Remove from List

Removes the list items that match a condition.

Category: Data

#When to use it

Use it to delete items from a list: one note, every finished to-do.

#Example

The Delete button in each row of a notes Repeater: State: notes, Where: it.id == item.id.

To clear every finished to-do at once: State: todos, Where: it.done.

#Good to know

  • It removes every item that matches. If nothing matches, the list stays the same, and that's not a failure.
  • To ask first, put it inside the Delete button of a Show Alert.

#Add it

Select a view, open the Inspector's Actions tab, pick when it runs, tap Add action and choose Remove from List (under Data). Tap the step to open its settings.

#Settings

SettingWhat it doesKindDefault
StateThe list.VariableRequired
WhereWhich items: a formula where it is each item.Condition (a formula)Required

#See also