Plugin release: Vantage - Advanced search builder

Hm. How do you have the dates encoded into a given task on a project page? What would a successful query look like?

Glad you figured it out. The top section targets properties of the note proper, while the button helps target specific parts. The secret goal of the plugin is just to help people understand searching so that they can build their own queries, as it’s quite difficult to make a GUI to fit every possible transfiguration. Still, I’m open to hearing about better ways!

2 Likes

On a page I’d have something like

    - [ ] Send updated debtors report to directors, [[2021-01-29]] 

On the 2021-01-29 page I can see this item via backlinks, but I can’t see anything held over from yesterday without updating all the dates (and one could argue that’s good practice to reasses them all)

Am looking for a query that can show all uncompleted tasks up to and including that date, no matter where they are. Anything without a date can be excluded.

I may be asking for more than is possible from Obsidian at present.

So the task line always includes a link to the date?

No. Not all tasks are dated. Only those I know must be done on a certain day, or at least that I have to look at on that day.

- [ ] Buy replacement tent pegs

is an example of an undated task.

Sorry, yeah, I got that. I just meant: do all the tasks you’d want to find this way include a linked date?

Would it be possible for the plugin to add the function that return section ID ([[note#section]]) and line ID ([[note#^line]]) for section and line operators in addition to [[note]]?

What i mean is this function:
https://forum.obsidian.md/t/copy-search-results-add-line-block-section-function/10981

I like the idea, but I think it’s out of scope for Vantage at the moment. Sorry!

(The plugin actually doesn’t handle the search or its results whatsoever. It merely generates useful queries in the right syntax.)

2 Likes

Sorry, yeah, I got that. I just meant: do all the tasks you’d want to find this way include a linked date?

Yes.

1 Like

Thank you for your response!

1 Like

@ryanjmurhpy, with the help of Vantage I managed to get a few things sorted out last night which get me a long way towards a workable solution. Once I get it done and run with it for a week or so, I’ll make sure to post about it somewhere.

Reminder of setup:

  • each project has a page
  • a project’s tasks are on that page, some of which are dated, some are not
  • there are 2 other pages for misc work and personal tasks
  • otherwise, tasks are nowhere else

Goal: Be able to query all tasks due today, or overdue.

Tracking page is @today. It has

    (/- \[ \].*2021-01-28.*/) 

A simple matter of updating the date each day.

When previewed, brings up all tasks that are dated today.

But what about yesterday and tasks I may have missed? There are 2 options here.

  1. Update the dates on all tasks from yesterday, then update date on query. Some due yesterday may not necessarily be due today so this is good discipline.
  2. Modify the query to
    (/- \[ \].*2021-01-2[78].*/) 

which will pull up yesterday and today (adjust to suit).

The building blocks are there.

Glad you’re making progress!

I could also make the date range query builder an option in the content section. That way you could use the plugin to search for “lines with links to yesterday or today” and it’ll generate e.g., line:(- [ ] [[2021-01-27]] [[2021-01-28]]). (Typing that on my phone, but you hopefully get the gist.)

2 Likes

Wow. Great! I’ll try it right now! Thank you, very much!

And yes, I struggled with the command palette as well. Would it be possible to place a button somewhere? I love buttons :smiley:

Thanks for reporting though—I’ll make a note to clarify how to access it in the readme.

Just for you: see the 1.1.0 release for a Vantage button in the app ribbon!

(Easy to do—should’ve provided it from the start. Sorry!)

Beautiful :clap: :clap: :clap:

Question: Can you suggest a way to hide the rather complicated search string at the top of the query result display? @ryanjamurphy

For sure.

Pretty sure this is all you need:

.internal-query-header-title {
    display: none;
}
3 Likes

HI. Maybe a stupid question: I use Obsidian on my 14’’ laptop, in which case the Vantage’s UI is beyond the edge of the screen. :joy: How can I make it adapt to the screen size?

1 Like

That’s a challenge I haven’t been able to figure out. Any suggestions? What would you cut or change?

I’m wondering if we could do something like this to display all overdue tasks, i.e. return every incomplete task that links to a daily note before today’s note. Seems like it would result in impossibly long queries unless there’s a more elegant way to define a range.

1 Like

I’ve been playing around with this. It’s tricky as my first attempt was successful at matching all dates.

I think you need something like I’ve posted earlier which works for 2021 dates only, up to today.

```query
line:(/- \[ \].*\[\[2021-02-2[0-8]\]\].*/)
```

For tomorrow, 1 March it would change to

```query
line:(/- \[ \].*\[\[2021-03-01\]\].*/)
```

The regex simply gets too complex for my understanding when you get to handling multiple years and then knowing you’re only up to Feb/March in the current year ie. how do you pick up 2019-12-14 in addition to 2021-02-28.

With the code above, I simply adjust for each day to move it forward. If I have a couple of days, I use an appropriate range.

1 Like

Version 1.2.0 (and 1.2.1), released today, allows you to add “NOT” tokens (e.g., -(some subquery) to your searches.

I haven’t added dates to the line searches yet. Trying to figure out ways of doing it while keeping the UI as compact as possible…