Enhanced Filtering for Selecting Multiple Medical and Urgent Reports

Hello everyone, I would like to be able to select “medical” and “urgent” at the same time and filter the “REPORTS” according to the selected tags.
this my code :slight_smile:

  listField="tags" 
  checked="urgent" unchecked="" default=""> 
  Urgent 
</$checkbox>

<$checkbox tiddler="$:/temp/notes" 
  listField="tags" 
  checked="medical" unchecked="" default=""> 
  Médical 
</$checkbox>

<$list filter="[tag[  ???  ]!is[system]!sort[created]]">
        <div>
          <$view field="text"/> <br>
       </div>
</$list>

Best reguards, Auguste

To filter by two tag values, simply use both tag[...] filter operators, like this:

<$list filter="[tag[medical]tag[urgent]!is[system]!sort[created]]">

Notes:

  • The tag[medical] filter selects tiddlers that are tagged with “medical”, using all[] as the implied default input.
  • Then, tag[urgent] selects tiddlers that are tagged with “urgent”, using the previously filtered tiddlers as input.

enjoy,
-e

1 Like

@EricShulman’s (as always excellent) answer shows how to do both Medical and Urgent. If you want to collect tiddlers tagged either Medical or Urgent, a question I asked yesterday about selecting anything that matched any of a list of tags might help.

I was unhappy with my solution, which here might look like

[tag[Urgent]] [tag[Medical]] +[unique[]!sort[created]]

And @Charlie_Veniot gave the much more satisfying

Urgent Medical +[tagging[]!sort[created]]

Note that the original was more complex as it dealt not with two tags but a dynamic list of them.

3 Likes

I tried to implement the code in my “REPORT” but without success; I might be going about it the wrong way, I would like you to help me fix it.

This code displays a general “REPORT” based on entries in my “DASHBOARD” with text selections and tags. I would like to list in “REPORT” using checkboxes containing tags only the “reports” I need to view. Thus, the checkboxes will be used for searching, filtered by checked boxes containing tags that certain “reports” are tagged with, and based on this, we can display “reports” by checked checkboxes.

<details open><summary>Notes with tag <<tag fieldnotes>><<tag jeune>></summary>

<$list filter="[tag[fieldnotes]!is[system]!sort[created]]">

;<$link/> <$transclude $tiddler="$:/core/ui/ViewTemplate/tags" $mode="inline"/>

:Jeune(s): ''{{!!jeune}}''
:Note-type: ''{{!!note-type}}''
:Text: ''{{!!text}}''
</$list>

</details>

I need to successfully implement this search function. thank you

I’m a little lost in what you’re trying to do. Could you describe the goal differently, perhaps in a form like:

  1. The user will see this (options available, and format)
  2. The user make these choices (links clicked, checkboxes/radios (de)selected, dropdowns chosen)
  3. The user will now see/experience this (changes to this or another tiddler, new tiddlers created, etc.)