Page 1 of 1
SC: Formatlist "dedupe" of lists not in alphabetical order
Posted: 05 Jul 2013 17:46
by 40k
For example:
a|b|d|e|b|a does not dedupe "b" or "a".
Re: SC: Formatlist "dedupe" of lists not in alphabetical ord
Posted: 05 Jul 2013 18:09
by admin
As advertised in help:
"Removing duplicates only works on adjacent items, so if the list is not sorted non-adjacent duplicates remain in the list."
Re: SC: Formatlist "dedupe" of lists not in alphabetical ord
Posted: 05 Jul 2013 18:12
by 40k
admin wrote:As advertised in help:
"Removing duplicates only works on adjacent items, so if the list is not sorted non-adjacent duplicates remain in the list."
Oh.

Re: SC: Formatlist "dedupe" of lists not in alphabetical ord
Posted: 09 Sep 2013 09:35
by kiwichick
Can someone please tell me what is wrong with this script? It sorts the list but doesn't remove duplicates. Cheers.
text formatlist(report("{basename} <crlf>"), sd);
Re: SC: Formatlist "dedupe" of lists not in alphabetical ord
Posted: 09 Sep 2013 09:42
by highend
help file - formatlist()
separator
Separates the items in the list; defaults to | (pipe).
If you pass "" (empty) the list is treated as a list of single characters.
...
Re: SC: Formatlist "dedupe" of lists not in alphabetical ord
Posted: 09 Sep 2013 10:36
by kiwichick
Thanks highend, The 'pipe' separator works. But then how do I display the results as a list? Cheers.
Re: SC: Formatlist "dedupe" of lists not in alphabetical ord
Posted: 09 Sep 2013 10:54
by highend
?
What's wrong with:
Code: Select all
text formatlist(report("{basename}<crlf>"), "esd", "<crlf>");
Re: SC: Formatlist "dedupe" of lists not in alphabetical ord
Posted: 10 Sep 2013 01:15
by kiwichick
Nothing wrong with it at all

Thanks!!!