BookmarkSubscribe
Choose Language Hide Translation Bar
antoinesofradir
Community Trekker

[JSL] How can i know the number of values in my list ?

Hello,

I have a list with lots of values and i would like to know, how many values are there in this list ?

Thanks for your help !

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User ms
Super User

Re: [JSL] How can i know the number of values in my list ?

N Items(list)

0 Kudos
2 REPLIES 2
ms
Super User ms
Super User

Re: [JSL] How can i know the number of values in my list ?

N Items(list)

0 Kudos
pmroz
Super User

Re: [JSL] How can i know the number of values in my list ?

If you need to know the number of unique values in the list here's a handy function:

Get_unique_values = Function( {in_list},

{Default Local},

tmp = [=> 0];

Insert Into( tmp, in_list );

tmp << get keys;

);

To use it, first compile the function, and then call it like this:

my_list = {"aa", "bb", "bb", "cc", "cc"};

print(get_unique_values(my_list);

{"aa", "bb", "cc"}

0 Kudos