On Tuesday, August 18, 2020 at 10:06:59 AM UTC-7, Werner wrote:
>
> I am referring to a tiddler called activeDossier whose contents refers to 
> a JSON data tiddler. Tiddler content 
> is {{$:/data/CI/companyRegister##1/name}}.
>
> <$set name="theCompany" value={{$:/data/CI/activeDossier}}>
> !<$vars tv-wikilinks=no><<theCompany>></$vars> <!-- gets displayed 
> properly -->
> <$list filter="[!is[system]search<theCompany>]" >
> <<currentTiddler>>
> </$list>
> </$set> 
>

The problem is that you are doing a "double transclusion".  That is, the 
value of <<theCompany>> retrieved via transclusion isn't the actual name of 
the company as text, but rather a secondary transclusion from a JSON 
tiddler (i.e., {{$:/data/CI/companyRegister##1/name}}).  When you render 
<<theCompany>>, TiddlyWiki automatically parses that transclusion and 
displays the actual value.  However, when you use search<theCompany> in the 
filter, the value isn't parsed any further, and you are literally searching 
for the transclusion syntax, not the actual company name as text.

To resolve this, use <$wikify> instead of <$set> to fetch theCompany value, 
like this:
<$wikify name="theCompany" text={{$:/data/CI/activeDossier}}>
!<$vars tv-wikilinks=no><<theCompany>></$vars> <!-- gets displayed properly 
-->
<$list filter="[!is[system]search<theCompany>]" >
<<currentTiddler>>
</$list>
</$wikify>
The $wikify gets the value from the activeDossier tiddler AND then also 
parses that value, so the result is the desired text value from the 
underlying $:/data/CI/companyRegister tiddler.

When you use it in the search<theCompany> filter, it's already fully 
resolved to be the actual company name as text, so the search should work 
as you intend.

-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6fb2e598-4265-4984-b7f4-8757a255214co%40googlegroups.com.

Reply via email to