Thanks a million Mat for your answer, it's very surprising it is working 
with me now as I tried it before with no luck.

realy appreciate your help
On Sunday, February 21, 2021 at 3:04:12 PM UTC+2 Mat wrote:

> Probably even:
>
> <$list filter={{!!query}}>
>
> </$list>
>
> The empty line is important if you want the result as a list. Note that 
> the !!query only refers to the *current* tiddlers query field. In your OP 
> you mention reusing it in any tiddler. So if you want one filter to be 
> reused in any tiddler, you can put the filter in a separate tiddler and 
> then refer to it as filter={{mytiddler}}.
>
>
> <:-)
> On Sunday, February 21, 2021 at 1:38:34 PM UTC+1 Mohammad wrote:
>
>> <$list filter="[subfilter{!!query}]" variable=dd>
>> <<dd>>
>> </$list>
>>
>> The last > was forgotten in previous post
>>
>> Best wishes
>> Mohammad
>>
>>
>> On Sun, Feb 21, 2021 at 4:06 PM Mohammad Rahmani <[email protected]> 
>> wrote:
>>
>>> Instead of
>>> *\define me()*
>>> *{{!!query}}*
>>> *\end*
>>>
>>>
>>> *<$wikify name="ss" text=<<me>> >*
>>>
>>> *     <$list filter=<<ss>> variable="dd" >*
>>> *            <<dd>> *
>>> *     </$list>*
>>> *</$wikify> *
>>>
>>> You should be able to use a much simpler solution
>>>
>>> <$list filter="[subfilter{!!query}]" variable=dd>
>>> <<dd>>
>>> </$list
>>>
>>>
>>>
>>> Best wishes
>>> Mohammad
>>>
>>>
>>> On Sun, Feb 21, 2021 at 3:40 PM Mohamed Amin <[email protected]> wrote:
>>>
>>>> OK, I figured it our, below is how I get it by using a Macro and 
>>>> "wikify" widget:
>>>>
>>>> *1- Put the "Query" in side a field (or tiddler) without Quotations *
>>>> query=[all[]tag[B]]
>>>>
>>>> *2- Create a Macro to prepare the "Transclusion" string:-*
>>>> \define me()
>>>> {{!!query}}
>>>> \end
>>>>
>>>> *3- Excute the "Transclusion" to get the "final value" :*
>>>> <$wikify name="ss" text=<<me>> >
>>>>
>>>> *4- Use the "final value" inside your filter :*
>>>> <$list filter=<<ss>> variable="dd" >
>>>>
>>>>
>>>> *\define me()*
>>>> *{{!!query}}*
>>>> *\end*
>>>>
>>>>
>>>> *<$wikify name="ss" text=<<me>> >*
>>>>
>>>> *     <$list filter=<<ss>> variable="dd" >*
>>>> *            <<dd>> *
>>>> *     </$list>*
>>>> *</$wikify> *
>>>>
>>>>
>>>> Regards
>>>> On Sunday, February 21, 2021 at 1:10:00 PM UTC+2 Mohamed Amin wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Suppose that I've a single "Filter Query" which be used inside a lot 
>>>>> of Tiddlers.
>>>>> Is there a way to save that query inside a "separated tiddler" or 
>>>>> "field", so If I need to change/correct it, I can change it from one 
>>>>> single 
>>>>> location?
>>>>>
>>>>> *For example: *a query like:
>>>>> *QUERY="[enlist{$TdlrName$!!elements}each[aliases]get[aliases]] 
>>>>> +[enlist-input[]trim[]each:value[]]"*
>>>>>
>>>>> 1- used in one Tiddler as =
>>>>> *<$list filter=QUERY >*
>>>>> *do something*
>>>>> *</$list>*
>>>>>
>>>>> 2- and in another Tiddler as =
>>>>> *<$set filter=QUERY variable="var">*
>>>>> *Do another thing*
>>>>> *</$set>*
>>>>>
>>>>> Also used in many other Tiddlers.
>>>>>
>>>>> Now, can I implement some thing like the below, so I can put it inside 
>>>>> all affected tiddlers?
>>>>>
>>>>> *<$list filter={{!!QueryInsideField}} >*
>>>>> *do something*
>>>>> *</$list>*
>>>>>
>>>>> Regards
>>>>>
>>>> -- 
>>>> 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 [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/tiddlywiki/5031d264-96ea-4004-9335-70d375728f77n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/tiddlywiki/5031d264-96ea-4004-9335-70d375728f77n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/32b310b3-77ce-492f-b715-ba65f5b52fd8n%40googlegroups.com.

Reply via email to