Using a "NOT" operator in collection filter schema

It will be great if there is “inequal” or “otherthan”-like operator.

For example,

{
  "type": "visibility",
  "op": "notequals",
  "arg": 1
}

to select non-priority cards, and

{
  "type": "tag",
  "op": "notcontains",
  "arg": "not-tasks"
}

to filter out cards which contains - [ ] markup but are not task-management-purpose cards.


Sorry for topic spamming!

No worries, glad you’re putting Custom Collections through their paces!

Luckily this already exists, but we’re still working on all the documentation around it and recognize the filters UX is still a bit more complex than it should be.

Anyway, what you’re looking for is the inv property on a filter, which “inverts” it. This works on any filter type in order to make it a NOT X filter.

Like so:

{
  "type": "visibility",
  "op": "equals",
  "arg": 1,
  "inv": true
}

^ includes all cards that are not Priority Visibility.

{
  "type": "tag",
  "op": "contains",
  "arg": "not-tasks",
  "inv": true
}

^ includes all cards that do not have a “not-tasks” tag.

2 Likes

oh, I love how the filter and Boolean works. this is definitely solved, thank you!

1 Like