Filter filtering (when is a search not a search)

A couple of (perhaps) related questions:

First, if we are searching for instances of the @search tag which do have a value between parentheses (rather than examples like this sentence) is the best itemPath something like:

//@search > ''


Or is there a more direct way of distinguishing between tag instances which do have values and those which don’t ?

Second, I notice that sentences like this with a mid text @search tag (but no search pattern) :

  1. Do appear in the saved filters list with a loupe icon
  2. Don’t, in practice, function as saved filters

Not a real impediment, but might that perhaps be fixable with a fine-tuning of the underlying itemPath ?

( PS this came up in the context of a Keyboard Maestro macro for sorted views which merges any new/unseen Title @search(itemPath) patterns (in the active document) with the macro’s own list of filters / reports. Hence the interest in an itemPath which searches for searches )

I think you might be getting tripped up by the ''… the search syntax only recognized double quoted "" strings. With that in mind I think the simpler search would be:

//@search = ""

To do the reverse (only match tags with values) I think the most strait forward would be:

//@search matches ".+"
1 Like

I’m not sure how adjusting the underlying itemPath would help… but it does seems like it would make sense to just now show saved searches in the sidebar unless they also have an associated search value. So in that example the search just wouldn’t show up.

1 Like