$list with filter stored in a variable with <another-variable-parameter> inside

82 views
Skip to first unread message

Shareda

unread,
Oct 17, 2020, 6:24:03 AM10/17/20
to TiddlyWiki
Hello! 
I have  full.filter  variable  containing one or more +runs evaluated dynamically. The simplest value is like this:
[all[tiddlers]!is[system]has[cite_no]] +[search:text:regexp<validate.search.regexp>]

<<validate.search.regexp>> gives a valid regexp that can contain sqare brackets, etc.

I am trying to run 
<$list filter=<<full.filter>>>
search results representation
</$list>

Also I tried to add 
<$wikify name="full.filter" text=<<full.filter>>>
before the list widget. But still no correct results.

What syntax should I use?

Mark S.

unread,
Oct 17, 2020, 3:09:05 PM10/17/20
to TiddlyWiki
You're showing us bits and pieces. In particular, you're not showing us your regular expression.

When I try this on TiddlyWiki.com :

<$set name=validate.search.regexp value="\bmes.*\b">
<$set name=full.filter value="[all[tiddlers]!is[system]has[caption]] +[search:text:regexp<validate.search.regexp>]" >

<$list filter=<<full.filter>>>

</$list>

</$set></$set>


it runs fine. So I think we need to know more about your regular expression, and maybe sample data. Better yet would be a page somewhere we could look at.

Shareda

unread,
Oct 18, 2020, 1:20:30 AM10/18/20
to TiddlyWiki
Hello, Mark S! Thank you for your attention to my question. The reason I have not included the entire text is because of its complexity. In particular, validate.search.regexp is a macro that uses another macro. And this whole tiddler doesn't work without it's transclusion through  the ViewTemplate. I can attach the export of all the necessary tiddlers, but it seemed to me that the right way to go by a more precise formulation of the question. 

Your answer inspired me with the idea that I should apply $wikify not only to the final macro, but also to the nested one. And voila! Everything works fine! Thank you for answering me, it really helped! 

воскресенье, 18 октября 2020 г. в 01:09:05 UTC+6, Mark S.:
Reply all
Reply to author
Forward
0 new messages