"List Fields" Filter : Data contains "space" or [[SingleWord]]

74 views
Skip to first unread message

Mohamed Amin

unread,
Aug 25, 2020, 7:04:20 AM8/25/20
to TiddlyWiki
Hello again,

I'm sure that I miss something trivial here, but I couldn't get it .

Suppose that I've 3 Tiddlers (Tdler01, Tdler02 and Tdler03) and all of them has filed called "status" with the following values:-
Tdler01.status = MyData
Tdler02.status = [[MyData]] 
Tdler03.status = [[My Data]]

As expected, I got the correct values when I run the following :-
{{Tdler01!!status}} = MyData 
{{Tdler02!!status}} = MyData
{{Tdler03!!status}} = My Data 
 
Now, My problem is when I try the following :-
{{{ [field:status[MyData]]  }}}  -> I got "Tdler01 " ONLY (should see "Tdler02" as will)
{{{ [field:status[My Data]]  }}}  -> NO result 

what I'm missing?

Appreciate your support


P.S.
I've a lot of fields contain data like [[MyData]] , as I was assuming (till today) that [[MyData]] and "MyData" are identical inside "List Fields"

Eric Shulman

unread,
Aug 25, 2020, 7:57:21 AM8/25/20
to tiddl...@googlegroups.com
On Tuesday, August 25, 2020 at 4:04:20 AM UTC-7, Mohamed Amin wrote:
Suppose that I've 3 Tiddlers (Tdler01, Tdler02 and Tdler03) and all of them has filed called "status" with the following values:-
Tdler01.status = MyData
Tdler02.status = [[MyData]] 
Tdler03.status = [[My Data]]

As expected, I got the correct values when I run the following :-
{{Tdler01!!status}} = MyData 
{{Tdler02!!status}} = MyData
{{Tdler03!!status}} = My Data 

Keep in mind that *rendering* (displaying) the value of a field causes it to be "wikified".   Thus, I assume that all three outputs above rendered as links.  This is because the first is a WikiWord and is automatically linked, and the others are explicitly surrounded by doubled square brackets which makes them links.
  
Now, My problem is when I try the following :-
{{{ [field:status[MyData]]  }}}  -> I got "Tdler01 " ONLY (should see "Tdler02" as will)
{{{ [field:status[My Data]]  }}}  -> NO result 

what I'm missing?

The "status" field is NOT a list field.  Only the "tags" and "list" fields automatically get special handling as list fields.

In any event, the field:fieldname[value] filter never treats the fieldname as a list (even for the "tags" or "list" fields).
It only compares the specified value with the entire contents of the specified fieldname.

To find tiddlers that have a specified value within any field whose content is a space-separated, bracketed list, use the contains:fieldname[value] operator:

Thus,
{{{ [contains:status[MyData]] }}}  -> results in Tdler01 and Tdler02
{{{ [contains:status[My Data]] }}} -> results in Tdler03

-e

Mohamed Amin

unread,
Aug 25, 2020, 11:17:57 AM8/25/20
to TiddlyWiki
Thanks a lot Eric for your details answer, 

Things are MUCH clear now
Reply all
Reply to author
Forward
0 new messages