Filter collected, Sort collected, and Clear collected are three actions that work on a list of collected records. Filter collected keeps only the records that match a condition, Sort collected puts them in a new order, and Clear collected empties the list. They're meant to help you shape a collection after an earlier action collected it.
You can use these actions for many things, including:
Keeping only tasks with the priority "High" before you send each assignee an email.
Sorting open invoices by due date, so the oldest ones come first.
Note:
Collect first. All three actions work on a collection created by an earlier action, such as
Search for records,Get view, orGet related. Without a collection,Select collected recordsshowsNo results.Each collecting action returns up to 1,000 records. If more records match, the result is cut to the first 1,000 without a warning. If you collect from the same database app twice, the second action adds to the same list.
Order matters. Actions run from top to bottom. Add
Filter collectedorSort collectedabove the action that uses the list.
Who can use the collection actions?
Automations are available on the Free, Plus, and Premium plans. The number of automation actions per month depends on your plan. See the limits for your plan on our pricing page.
To add or change these actions, you need to be a workspace admin of the workspace the database app is in. You also need full access to every database the automation uses.
Filter collected
Filter collected removes records from a collection that don't match your conditions. In the action list, its description reads Filter collected records.
To filter a collection:
Open the database app and click the automations icon at the top right (
Create and view automations).Open an automation, and add an action that collects records, for example
Add action→Search for records.Select
Add action→Filter collected. The step appears asFilter collected records.Check the collection. Tape preselects the nearest collection above this action. To change it, select its name. Without a collection, it reads
Select collected records.Select
Add filter. Tape adds a rowWherewith the first field and an operator that fits the field type, for exampleContainsfor text or=for numbers. Select the field name to choose the field to check, change the operator if needed, then enter the value. The placeholder in the text box isValue.Add more conditions with
Add filter, or nest conditions withAdd filter group. Combine conditions withAnd(all filters must match) orOr(at least one filter must match).Select
Save changes. For a new automation, the button readsCreate automation.
Filter collected settings:
Select collected records: the collection to filter.Where: the first condition. Each condition has a field, an operator, and a value.Add filter: adds a condition.Add filter group: adds a group of conditions. Combine conditions withAnd(all filters must match) orOr(at least one filter must match).
The operators depend on the field type, like in other filters. If you add no condition, all records stay in the collection. Learn more about filters →
Sort collected
Sort collected puts the records of a collection in order. In the action list, its description reads Sort collected records. Sort a collection when the order matters later, for example in an email table, or when later actions use the values of the first record in the list.
To sort a collection:
Select
Add action→Sort collected. The step appears asSort collected records.Check the collection. Tape preselects the nearest collection above this action. To change it, select its name. Without a collection, it reads
Select collected records.Check the first sort row. Tape preselects the first field with
Ascending. Select the field name to choose another field, and switch toDescendingif needed.Select
Add sortif you need a second sort field.Select
Save changes.
Sort collected settings:
Select collected records: the collection to sort.Add sort: adds a sort field. Each sort has a field and a direction.
Tape applies the sorts from top to bottom, so a later sort field breaks ties of the earlier ones. For example, sort by priority first, then by due date.
Clear collected
Clear collected empties a collection. In the action list, its description reads Clear collected records. Clear a collection when you want to start over, for example before you collect from the same database app a second time.
To clear a collection:
Select
Add action→Clear collected. The step appears asClear collected records.Check the collection. Tape preselects the nearest collection above this action. To change it, select its name. Without a collection, it reads
Select collected records.Select
Save changes.
Clear collected has one setting, Select collected records. It clears only the list in the automation. The records themselves aren't changed or deleted. Save values you need later first, for example with Rollup collected. After Clear collected, the list is empty, but you can still select it in later actions, for example to collect into it again.
Let's look at an example
Let's say your project team wants to warn the assignees of high-priority tasks, oldest due date first. Here's how:
Set the trigger to
When a record is updatedin the database appSprintsand select the fieldStatus.Add the filter
WhereStatusHas changed to"Closed".Select
Add action→Search for records, select the databaseTasks, and collect all tasks.Select
Add action→Filter collected, then selectAdd filterand set the row toPriorityIs"High".Select
Add action→Sort collected, then set the sort row toDue date,Ascending.Add the action that uses the list, for example
Comment on collected.Select
Add action→Clear collectedand select the collection.Select
Save changes.
The comment goes only to the high-priority tasks, and the list is empty again afterward.
Collection action errors
If a step fails, the run shows the step and its message in the automation's runs. Open the automation and select
▷next toManual run(View all runs,cmd/ctrl+1). Each run shows its status, for exampleSuccess; select a run to see every step. For all automations, openRunsin the Automation Center and filter byApp,Automation, orStatus.If
Select collected recordsshowsNo results, add a collecting action above this one.If the filter matches no record, the collection is empty and the actions after it have nothing to work on. If the list is empty, the actions that use it do nothing, and the run continues.
Test, pause, or edit the collection actions
Manual runruns the automation once. It appears after the automation is saved. UnderRun on, select the records, then selectStart run(Save and start runif you have unsaved changes). Actions that follow, such as updates or emails, work on real records.New automations you create in the editor are
Activeright away. The status,ActiveorPaused, sits below the automation's name in the editor. To pause one, select the status to switch it toPaused, then selectSave changes.To change an action, open the automation, select the step, make your changes, then select
Save changes.Each action has a menu with
Settings,Continue on error,Deactivate,Turn into,Duplicate, andRemove. Learn more about action settings →
Learn more
FAQs
Why filter a collection instead of filtering in Search for records?
Why filter a collection instead of filtering in Search for records?
Filter in Search for records when you only need the matching records. Use Filter collected when you want to keep the full collection for one step, then narrow it down for another.
Does Filter collected change my records?
Does Filter collected change my records?
No. It only changes the list in the automation. Your records stay as they are.
Do I need Clear collected?
Do I need Clear collected?
Not always. Use it when you want to collect again and start from an empty list.
Can I sort by more than one field?
Can I sort by more than one field?
Yes! Select Add sort again. Tape sorts by the first field, then uses the next field to order records that have the same value.
Is there a limit for the size of a collection?
Is there a limit for the size of a collection?
Yes. Each collecting action returns up to 1,000 records. If several actions collect from the same database app, their records add up in one collection. Learn more about limits →
Are there other actions I can use?
Are there other actions I can use?
Yes! Actions can create and update records, add comments, send emails, create PDFs, call other services, and more. See every action in Automation actions →
Are you a developer using the Tape API for automations?
Are you a developer using the Tape API for automations?
The automation API has its own documentation for developers. Full reference: filter_record_collection →
Still have questions? Find answers and get help from community experts in the Tape community →
