I don't believe you need the sort -- TW will do that internally when it 
process the lists.

Your original question asked to compare if two lists were the *same*. With 
only one set of runs, it will check only that one list is contained in the 
other.

-- Mark

On Monday, February 25, 2019 at 3:05:17 PM UTC-8, S. S. wrote:
>
> Hi Mark,
>
> By sorting, it compares one long string (the full sorted list of tiddlers) 
> against the other full sorted list of tiddlers - for an exact match.
> I ran a few test variations and it hasn't broken yet!
>
> Perhaps 2 runs as you suggest is safer? I'm not sure which way won't 
> break. Perhaps neither will.
>
> On Tuesday, February 26, 2019 at 5:41:46 AM UTC+7, Mark S. wrote:
>>
>> I think you also need to do a second run, checking for check-field > 
>> check-list. I don't think the sorts will matter one way or the other for 
>> the detection. I feel that you should be using subfilter or enlist like 
>> Tony suggested. Your examples don't have spaces in them. Maybe try some 
>> with spaces.
>>
>> Good luck
>>
>> -- Mark
>>
>> On Monday, February 25, 2019 at 1:43:33 PM UTC-8, S. S. wrote:
>>>
>>> Funny, how so often, when you write out the question clearly enough for 
>>> others to understand it, it becomes clearer to yourself how it can be 
>>> solved.
>>>
>>> Would this below solution break in certain situations?
>>>
>>> {!!list}} = [[A]] [[B]] [[C]]
>>>
>>> <$set name="check-list" filter="[[C]] [[B]] [[A]] +[sort[]]">
>>> <$set name="check-field" filter="[all[current]list[]sort[]]">
>>>    <$list filter="[<check-list>] -[<check-field>]" emptyMessage="match">
>>>       no-match
>>>    </$list>
>>> </$set>
>>> </$set>
>>>
>>>
>>>
>>> On Tuesday, February 26, 2019 at 4:13:15 AM UTC+7, S. S. wrote:
>>>>
>>>>
>>>> I have a feeling someone would have solved this before.
>>>> I want to know if a "list of tiddlers" match or do not match the 
>>>> tiddlers in a "list field"
>>>>
>>>> A tiddler has a list field: {{!!list}} = [[A]] [[B]] [[C]]
>>>>
>>>> A list-of-tiddlers is made.
>>>>
>>>> <$set name="list-of-tiddlers" filter="[[C]] [[B]] [[A]]">
>>>>
>>>> CODE comparing {{!!list}} with <<list-of-tiddlers>>
>>>> resulting in either <<match>> or <<no-match>>
>>>>
>>>> </$set>
>>>>
>>>> Thanks!
>>>>
>>>>

-- 
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/350ca8ee-f6be-4eba-bb98-aa9de45150a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to