Roomnumbering repeat items in list (room number by area)

Hi,

I’m quite new to dynamo and this forum.

For our project we maked an script to automatic number our rooms based on the Area’s where the room is inside. (we run the script in the Area Plan view)
Everything works fine except one thing.
For general places (storages) in the building we used the area number 00.01.00. This area number is more common in the project. In this example 3 times. (This is only a example the standard area number for general places can be different each project, but is always the same number)

By numbering the rooms now every area starts counting by 1.
For example:
Area with number 00.01.00 gives roomnumbers / 00.01.01 - 00.01.02 - 00.01.03
and the next area with number 00.01.00 gives roomnumbers / 00.01.01 - 00.01.02 - 00.01.03 - 00.01.04 - 00.01.05 - 00.01.06.

My question is if there is a way to start counting the rooms for the second(thrid etc.) area’s, with the same name, where the previous one stops?

The solution has to make:
The firtst Area with area name 00.01.00 gives roomnumbers / 00.01.01 - 00.01.02 - 00.01.03
And the second area with area number 00.01.00 gives roomnumbers / 00.01.04 - 00.01.05 - 00.01.06 - 00.01.07 - 00.01.08 - 00.01.09.
And so on for further area’s with the same name.

Create the last digits (01,02,03,…) using a single sequence not group.
Flatten your groups once you have the first 2 digits created (00.01,00.02, etc)
Then use + and it will add the initial sequence to the "grouped "one

Hope it’s clear

Thank you very much for the tip!
I don’t know if I did exactly what you means.

But I just move the groups in the right time stamps to understand it better for myself.
And I used List.GroupByKey to get the rooms of key (Area) and flatten it to get the repeatet Area numbers together.
The unique keys (first digits) can now be used as input 1 and the counted rooms as input 2.

Now it seems works in my testproject.