Concatenating (Joining) Hard and Indirect text within a Filter

91 views
Skip to first unread message

Thomas McLeod

unread,
Jun 28, 2016, 2:18:30 PM6/28/16
to TiddlyWiki
So I want to be able to search for all items tagged with String+Title. 
Example: 
Input: Company{{!!title}}
Output: CompanyApple
Where: Company is the string and Apple is the title of the tiddler

Now I want to be able to do this with a filter.
<<list-links filter:"[tag[Company{{!!title}}]sort[]]">>

This just returns nothing. 

I've also tried:
<<list-links filter:"[tag[Company+{{!!title}}]sort[]]">>

<<list-links filter:"[tag{{Company+!!title}}sort[]]">>



PMario

unread,
Jun 28, 2016, 3:38:24 PM6/28/16
to TiddlyWiki
Hi Thomas,

Can you describe, _what_ you want to achieve, and not how you want to achieve it.
I have the impression, there is a concept problem. But this may be just my problem of imagination :)

I can see, you want to create an automatic list in a tiddler named "Apple" with a prefixed tag. .. But why is your tag prefixed?

-mario

codacoder...@outlook.com

unread,
Jun 28, 2016, 5:43:34 PM6/28/16
to TiddlyWiki

Something like this?

 \define build-fullname() $(prefix)$$(title)$

<$set name=prefix value=Company>
<$set name=title value={{!!title}}>
<$set name=fullname value=<<build-fullname>>>
<<fullname>> List:

<$list filter="[tag<fullname>sort[]]"></$list>
</$set>
</
$set>
</$set>




Jed Carty

unread,
Jun 29, 2016, 3:38:35 AM6/29/16
to TiddlyWiki
The addsuffix filter operator can make this simpler. You could use a set widget in place of the outer list widget but if you do that than spaces in the title will break everything.

<$list filter='[[Company]addsuffix{!!title}]' variable=tag>
<$macrocall $name=list-links filter='[tag<tag>]'/>
</$list>
Reply all
Reply to author
Forward
0 new messages