David,

An aside, When it comes to numbers or a list of numbers it is safe to use 
space to delimit them because numbers do not typically contain spaces like 
tiddler titles may, EXCEPT IN YOUR EXAMPLE WHERE NUMBERS ARE EXPRESSED IN 
WORDS.

What I was think was to use a method such as split[ ] to separate each of 
the numbers/titles into a non deduplicated list, by then save them in a 
data tiddler where the value can be "repeated" but the index is always 
unique. 
So a set of numbers such as "1 2 3 1 2" can be saved in a data tiddler as;
item1: 1
item2: 2
item3: 3
item4: 1
item5: 2

They will now not be deduped, each number is effectively unique as it is 
referenced by the unique item key. There is also the "select" keyword now 
on the setWidget that allows you to address the nth item, and you can use 
the range operator to "iterate" the nth number.

In your example you are using titles for numbers is that correct?

<$set name="HasDuplicates" value="one two two three [[twenty one]] [[twenty 
one]] [[forty six]]">

<$list filter="[subfilter<HasDuplicates>]">

</$list>

item1: one
item2: two
item3: two
item4: three
item5: twenty one
item6: twenty one
item7: forty six


I hope that is clearer.

Regards
Tony








On Friday, April 26, 2019 at 1:29:43 AM UTC+10, David Nebauer wrote:
>
> Thanks, Tony. With your suggestion about incrementing a data tiddler, did 
> you mean something like this for a 3-column table?
>
> 1: Row 1 Col 1 value
> 2: Row 1 Col 2 value
> 3: Row 1 Col 3 value
> 4: Row 2 Col 1 value
> 5: Row 2 Col 2 value
> 6: Row 2 Col 3 value
> 7: Row 3 Col 1 value
> 8: Row 3 Col 2 value
> 9: Row 3 Col 3 value
> and so on...
>
> If I've misinterpreted you I'd appreciate you correcting my understanding. 
> If I did interpret you correctly, what you proposed is certainly a valid 
> approach, but maintaining dynamic table data would be fragile for any table 
> of non-trivlal size -- it would be so easy to introduce "off by 1" type 
> errors.
>
> Also, I've looked at incrementing variables before. That appears to be 
> another one of those things that is trivial everywhere else but impossible 
> in TW without installing a non-core plugin. (If I'm wrong about that I'd 
> love a pointer in the right direction.)
>
> Regards,
> David.
>
> On Thursday, 25 April 2019 11:55:01 UTC+9:30, TonyM wrote:
>>
>>
>> It should also be possible to uniquify items in a list by making them 
>> entries in a data tiddler (unique index) and increment a number and 
>> retrieve the nth item.
>>
>>

-- 
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/2694f62f-5288-4806-83f7-8f93af49e6ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to