obsidian-tracker icon indicating copy to clipboard operation
obsidian-tracker copied to clipboard

Header Categorization

Open Teighe opened this issue 1 year ago • 0 comments

``I am creating a daily intake with task checkboxes, some of which have the same target name, under multiple top level headers. For example, each header (Sleep, Diet, Body, and Mental Health) has an "Overall Quality" sub-header with checkboxes for "Good" and "Poor".

I would like to track those completed tasks for each header. I can get the Tracker plugin to target a checked task called "Good", but I can't figure out how to get it to identify only the task with that target name under the header "Sleep." Any checked task labeled "Good" triggers the tracker.

I can't find anything on the web that explains how to narrow the searchTarget to a specific header or, more ideally, sub-header. And unfortunately I'm new enough to coding that I don't know how to troubleshoot this. I was hoping someone might be able to help me or steer me in the right direction. Or even just confirm if this can be done.

Thank you!

Below is an example of two categories in my intake. And below that is an example of the tracker code I was trying.

Intake markdown:

SLEEP

Overall Quality

  • [ ] Good
  • [ ] Poor

Length:

  • [ ] Long
  • [ ] Short
  • [ ] Average

Integrity:

  • [ ] Continuous
  • [ ] Broken

DIET

Overall Quality

  • [ ] Good
  • [ ] Poor

Food Quality

  • [ ] Healthy
  • [ ] Mixed
  • [ ] Poor

Alcohol

  • [ ] Avoided

Cigarettes

  • [ ] Avoided

Tracker code:

searchType: task.done 
searchTarget: Good 
folder: Habits/*/## SLEEP/ 
month:

Teighe avatar Mar 10 '23 04:03 Teighe