Some experiments,

The Following gets the value from test, if empty test2 if empty test3

<$list filter="[all[current]get[test]] ~[all[current]get[test2]] 
~[all[current]get[test3]]">

</$list>

In this case you will never get the emptyMessage only emptyval returned as 
a title
<$list filter="[all[current]get[test]] ~[all[current]get[test2]] 
~[all[current]get[test3]] ~[[emptyval]]" emptyMessage="Empty">

</$list>

The following gets the value of test if it has one, otherwise returns 
testempty
<$list filter="[all[current]get[test]] ~[[testempty]]">

</$list>
Not really different to emptyMessage

I have not worked out how yet, but I am convinced we can do some very 
complex conditionals using + - and ~

This will tell us a tiddler is "not active" if it has an item-completed or 
item-cancelled field with contents

<$list filter="[all[current]has[item-cancelled]] 
~[all[current]has[item-completed]]">
Not active
</$list>

Regards
Tony

On Thursday, November 22, 2018 at 5:47:48 PM UTC+11, TonyM wrote:
>
> Mohammad,
>
> I believe it just came out, so I doubt many have.
>
> On the git hub item I asked if multiple can be strung together, something 
> I will test soon.
>
> I just tried this to display the caption and if none the tiddler name
> <<currentTiddler>>
> <$set name=display-title filter="[all[current]get[caption]] ~[{!!title}]">
> <<display-title>>
> <$link to=<<currentTiddler>> tooltip="Open tiddler"><<display-title>
> ></$link>
> </$set>
>
> However the link opens the non existent tiddler with the caption name 
> rather than <<currentTiddler>>
>
> Not sure why that would be
>
> Regards
> Tony
>
> On Thursday, November 22, 2018 at 3:50:44 PM UTC+11, Mohammad wrote:
>>
>> The new prerelease 5.1.18 has introduced a *new filter prefix called 
>> Else*
>>
>> See below:
>>
>> https://tiddlywiki.com/prerelease/#Filter%20Expression
>>
>>
>>    -  NEW IN: 5.1.18 the prefix ~, if the filter output so far is an 
>>    empty list then the output titles of the run are dominantly appended 
>>    <https://tiddlywiki.com/prerelease/#Dominant%20Append> to the 
>>    filter's output. If the filter output so far is not an empty list then 
>> the 
>>    run is ignored
>>
>> In technical / logical terms:
>> RunInterpretationOutput
>> run union of sets ... OR run
>> +run intersection of sets ... AND run
>> -run difference of sets ... AND NOT run
>> ~run else ... ELSE run
>>
>>
>> Has anybody tried it? I appreciate to share some examples here
>>
>> Cheers
>> Mohammad
>>
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7d9afc71-e9b7-443c-a488-f88909a76b1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to