Dynamically update Tags based on Criteria

Hello Obsidian community,

My goal is to dynamically add a tag to a note based on some field value. As the field value changes, so does the existing tag based on a criteria.

The tag must behave like any other tag that a user may manually add to a note e.g. tag can be displayed in graph view.

Here is an example

A note has two fields:

(1) Days Since

  • This field calculates the number of days since the note was created.
  • With each next day, the field increases by 1 day.

(2) Status

  • This field calculates the status of the note based on the ‘Days Since’ field. There are three possible field values: #Green, #Yellow, #Red
  • ‘Status‘ equals #Green when: ‘Days Since’ <= 7 days
  • ‘Status’ equals #Yellow when: 7 days < ‘Days Since’ <= 14 days
  • ‘Status’ equals #Red when: 14 days < ‘Days Since’

What I have tried

  • Using the dataview plugin, I have tried implementing the above fields as inline dataview queries. ‘Status’ updates each day based on the criteria the field value is not ‘baked’ into the file as markdown text which means I can not use the tag in the graph view or other plugins which require a tag for filtering purposes.
  • I have done something similar with the Templater plugin where the ‘Status’ field merges the correct tag but does not update/re-merge when the ‘Days Since ‘field changes.

Any help would be greatly appreciated.

Cheers

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