List functions, contains and distinct limitations?

List functions, contains and distinct limitations?

Hello,

I am trying to use contains() and distinct() and sort() functions but it seems there is a limitation in number of records these functions can handle?

Look at this script for example, this is an iteration of distinct() function after I found it wasn't working:

Note V.Categorias field is a text field with items separated by commas.

Application link (in case you want to look at the actual code)

Categorias_Lista = List();
for each V in Vectores
{
    V.Categorias=V.Categorias.toUpperCase();
C= List();
C.addall(V.Categorias.toList());
for each Categoria in C 
{
if Categorias_Lista.contains(Categoria)
{
}
else
{
Categorias_Lista.add(Categoria);
}
}
}
Categorias_Lista.sort();
Radio:ui.add(Categorias_Lista);



This script gives me this result (which is not distinct nor sorted), any workaround?:


, ACERTIJO, ADORNOS, ANIMACION, ANIMACIÓN, ANIMACÓN, ANIMALES, ARBOL, AVE, BAUTIZO, BIENVENIDO, CALADOS, CARICATURAS, CHEF, CIELO, CUPCAKES, DEPORTE, DINOSAURIOS, DISNEY, ESCUDOS, FIESTA, FIESTAS, FIGURA, FIGURAS, FLORALES, FLORES, FROZEN, FUTBOL, HADAS, HALLOWEEN, HORA DE AVENTURA, INFANTIL, INFANTILES, JAULAS, JUGADOR, LEGO, MANUALDADES, MANUALIDAD, MANUALIDADAES, MANUALIDADES, MANUALIDADES., MARIO BROS, MARVEL, MEDICINA, MUÑECA, MUÑECO DE NIEVE, NAVIDAD, NIÑAS, PAJARO, PAJAROS, PELICULAS, PELÍCULAS, PRINCESAS, PROGRAMAS DE TV, PROGRAMAS TV, RECUERDOS, RENO, SERIES DE TV, SERVILLETERO, SERVILLETEROS, SIMBOLOGÍA, VACA, VIDEO JUEGOS, VILLANO, VILLANOS,ANIMACION,ANIMACIONES,ANIMACIÓN,ANIMACIÓN. HORA DE AVENTURA,ANIMACÓN,ANIMALES,ARBOL,ARBOLES,AVE,AVES,BAUTIZO,CIENCIA,COCINA,DEPORTE,DINOSAURIOS,DISNEY,ESCUDO,ESCUDOS,FANTASMA,FIESTAS,FIGURA,FIGURARAS,FIGURAS,FLORES,FROZEN,GALLO,HALLOWEEEN,HALLOWEEN,INFANTILES,JAULA,LEGO,LETRAS,LETRERO,MANUALIDAD,MANUALIDADES,MARVEL,NAVIDAD,NUBES,PELICULA,PELICULAS,PRINCESAS,PROGRAMAS DE TV,ROSA,SERVILLETEROS,VIDEOJUEGOS,VILLANO,VILLANOS