-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for using YAML front Matter Values as Variables in Queries [via placeholder values, without the need for 'filter by function'] #3154
Comments
Yes this would be good to have. I think I see this as a duplicate of: |
That other issue does require understanding ‘filter by function’ so is a little more advanced that the examples that you give. But the example you give is rather more error prone in that not all users format their dates in the same way in YAML. |
I apologize for not noticing this earlier. I look forward to the implementation of query.file.property() and hope it will support placeholders in the future. Thank you for your time and effort. |
Yes, that issue mentioned in the limitations is the same one I linked to above. I can see how the connection was not obvious. Once query.file.properties existed it would automatically be available in placeholders, although I would still worry about date formats. |
Thank you for your response. I would also like to mention that Tasks has been incredibly helpful in both my personal and professional life. Since a similar issue has already been submitted, please feel free to close this issue. |
You're very welcome - I'm glad it's been useful.
Actually, it's proposing to implement a feature which is useful for those who do not know Javascript, so I've modified the title to show how it is different from #3083, and will keep it open. |
🔖 Feature description
I would like to suggest a feature that I believe could enhance the plugin's functionality. Specifically, I'm interested in being able to use values defined in the YAML front matter as variables within task queries in the same file.
For example, if I have a YAML front matter entry and a query like this:
✔️ Solution
In my use-case, <YAML front matter's workdate> would dynamically reference the workdate value specified in the YAML section of the same file. This would allow for more flexible and context-aware task filtering based on metadata defined in the file.
❓ Alternatives
No response
📝 Additional Context
If this functionality were implemented, it would significantly expand the versatility of the Tasks plugin. Users could create highly customizable templates, dynamically adjusting task queries based on file-specific YAML values. This capability would make it possible to design and maintain templates that automatically adapt to various contexts, reducing the need for manual adjustments and increasing consistency. Such a feature would not only streamline task management but also enable more advanced and reusable workflows for users who rely on templating.
Thank you for considering this request.
The text was updated successfully, but these errors were encountered: