Query language cannot filter tasks by related field values on list-type relation fields

Summary It is not possible to filter tasks by label values in views using the query language or the UI filter feature. Both approaches fail with different errors, making label-based views non-functional.

Environment

  • Routine Desktop (macOS)

  • Workspace: Personal


Bug 1: Query language — no valid syntax exists to filter by label value

I spent significant time reverse-engineering the query language to filter tasks by a specific label. Every approach fails:

tasks where 'Labels'._routine.id = "row:-WgOvBio66X4HKadsdTgV" limit 50name '_routine' not found on [reference:table:Qs7P7_AMyRb-9PZOe5IQe]

tasks where 'Labels' inside ["row:-WgOvBio66X4HKadsdTgV"]element type [reference:table:...] doesn't match list element type

tasks where labels.Title = "Delegate" limit 50LHS must be a field name, got labels.'Title' (parser auto-quotes the field)

tasks where labels._routine.id = "row:-WgOvBio66X4HKadsdTgV" limit 50name '_routine' not found on [string: { _routine: routine-metadata, Title: string | null | null }]

tasks where length('Labels') > 0 limit 50 → ✅ Works, but only checks if any label exists — cannot filter by a specific label value

The error messages reference a Membership filter pattern as the correct approach (use Membership filter instead), but the pattern is never described and no syntax I tried matches it.


Bug 2: UI filter for Labels also fails

When using the visual filter builder in the UI to filter tasks by Labels, Routine generates a query using the _routine.id = null pattern, which also fails at runtime with the same _routine not found error. This means label filtering is broken both through the UI and through manual queries.


Expected behavior It should be possible to write a query like:

tasks where 'Labels' contains "Delegate" limit 50

or use the UI filter to filter tasks by a specific label value and have it work correctly.

Actual behavior No syntax in the query language successfully filters tasks by a related label value. The UI filter generates invalid queries for this field type. The only working label-related filter is length('Labels') > 0 which cannot target specific label values.


Additional context The internal data structure shows labels are stored correctly — running labels limit 50 successfully returns all label objects with their Title fields and row IDs (e.g. row:-WgOvBio66X4HKadsdTgV = "Delegate"). The data exists and is accessible, but the query language provides no valid path to filter against it.

If there is a working syntax for the Membership filter pattern referenced in error messages, documentation would resolve this immediately.

Platforms
macOS
Upvoters
Status

In Progress

Board
🐛

Bugs

Date

About 10 hours ago

Author

User

Subscribe to post

Get notified by email when there are changes.