Remove Duplicates from Text List

  

Hello,

I have a list of Text and I would like to delete the duplicated ones.

I tried to loop through the list and compare the current value with the next value but that didn't seem to work. I tried to duplicate the list and compare with it, also didn't seem to work. 


Thanks!

Hi Ric,

How are you manipulate the text and/or String?

I didn´t find any issue of it.

Look in my Personal Cloud manipulate the texts. Names and Email are List Text.


WEBSCREEN PRINCIPAL


Can you send your OML to help you out?



Hi Ric Afons,

send your oml to help you



best regards,

Luís Pereira

Hi Ric,


Here is a quick way of doing it:

- Have a temporary text variable

- on first iteration add the current Text value into the temporary text, put some kind of delimiter after it (ie: a comma or something more complex, and unlikely to be used in a text like "###"), and execute whatever logic you need.

- second iteration, and all other: search the temporary text for your current text (Index function), if it doesn't exist then add it to the temporary text, followed by your chosen delimiter, and execute whatever logic you need.


This might get messy for HUGE text lists but for most common usages it will be fine.


Cheers,

Hermínio

The SortRecordList extension has a de-dupe function.

J.Ja