Searching text in file containing result of Tasks query

Hi,

So, followed some guidelines on youtube/Internet and now I have daily notes, which contain Task plugin queries. Everything works and tasks from other files are displayed.

Trying to search in the file for text, contained in the result of a query, is not working.
I guess it’s because the actual file (on disk) still contains only the query and not its result, while searching text in the file, does it on the file itself.

How I can search text in the output of the queryies too?

Thanks
Dima

What I’m trying to do

Hello!
I signed up to the forum to (hopefully) get this discussion going.

I create a lot of tasks daily too, and it has been impossible for me to search through them.
Also I would be very interested in knowing if someone has managed any sort of persistance for these files, as @dimba says, the raw files only contains the query (be it DataView, Tasks, or others).

Thanks in advance, and have a nice day

With dynamic queries, you can’t globally search query result

As long as the query is dynamic, you can’t search it outside of the local “find-in-file” search. That’s the downside of using queries in general.

If you think about it, this also makes sense, as otherwise Obsidian needs to update every query all the time in your vault, when you want to do a search. That can be rather costly, if you got many queries in your vault.

Theoretically, one could argue that a plugin could be made which searches all currently open files, but I don’t I’ve heard of such a plugin, yet.

With static queries, global searches can be done

If you switch to either doing queries through some templater which outputs the query result into static text, or using a plugin like Text expander to do your queries, the results are searchable.

However, the queries are static (or in the case of Text Expander semi-static, as you need to rerun the query expansion every now and then to get it to update its result).

And I’m not sure how easy it would be to use Text expander to extract tasks, but in theory it should be doable.

Not sure if other plugins are able to produce static results, whilst still allowing for the query to be re-run in given situations.

Template inserted query results

A kind of combination of the previous two can be achieved if you’re using a button in a note to replace the rest of the note with the query result. This would require that you write a template doing the query, and then using a button to insert that template in your note.

This will still require a manual push of the button every now and then to refresh the query result, but I’m not sure on your exact use case (as indicated in next section), so maybe this would be a viable solution for you.

Since the result now would be static, it’s also searchable…

Why do you need this?

One question though, is why do you need this? Aren’t your tasks defined somewhere as static text, and thus searchable? Where or how do you define tasks (or stuff) which are not to be found elsewhere in your vault?

Why isn’t it good enough to find the original data which could be presented in some query result?

Oh, I’m so sorry @holroy for taking so long to answer.
A lot of the approaches you tell us about are new to me, but i’ll try some of them out!

Regarding the why, it is mostly because of my daily notes. It would give me traceability on how i’ve worked on a task, for example. For the moment, my daily notes only contain the tasks i’ve created and completed today, but maybe I can do something about that.

You are right though, I could just as easily do a global search, but then my lazyness kicks in , haha.

Thank you for all the help though, it is nice to know there are some things I have yet to try

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.