Assigning number sequence and restart by each level

Hi, in a scenario where a certain number of rooms from different levels are selected as one list, the target is to number all rooms within that list from 001 to the last number of room on each floor.

For example, if rooms from different levels are selected, target to assign room number with the logic:
level 1 room numbers: 001, 002, 003…
level 2 room numbers: 001, 002, 003…
level 3 room numbers: 001, 002, 003…
…
level 999 room number: 001, 002, 003…

I am good with the selection and assigning nodes, just not sure how to trigger the restart of numbering sequencing by change of levels. Thanks.

image

Hi,

I think that List.GroupByKey is the one you want…

Hope that helps,

Mark

Works perfectly, thank you!