How to sequence repeat items in list?

Hi All,

I would like to ask for some guidance how do I only sequence repeated item in a list (but not all the item) in a list like the screenshot below ?

Thanks in advance everyone :slight_smile:

You could check for all unique items and their count with a node from the Clockwork package, then you could use a range (codeblock or normal) and then add these together

One approach would be to flatten the list, group by key using itself as the key, you can then add a ‘1…count’ sequence to the end as required, then use the ‘001,002’ portion of the string as a key to group them back to the original formatting.

Hi Daan,

Thanks for reply, i tried list.countoccurences , but i couldn’t figure out how i sequence the repeated items to be A1,A2,A3…A4 …

Hi Hamish,

I wanted to keep the list structure in order to have the naming. thanks for guidance

ck

Using a ‘GroupByKey’ pulling the ‘001,002,etc’ from the string as suggested would return your list to its original format.

Admittedly probably not the cleanest way of doing things, but it gets the result (unless I’ve completely misread your intent).

2 Likes

Hi Hamish,

Your solution worked !, thank you very much … I really need to learn to use groupbykey

have a good day

1 Like