Numbering Sequence with Filter

I am trying to add sequence numbers to structural foundations. But I want the pile caps and piles to have separate sequence numbers. And if I wanted it to be numbered from left to right, how can it be done?

GOE_Tete_de_pieux = Pile Caps
GOE_Pieux_xxxmm Diametre = Piles
GOE_Numero is a shared parameter (Text)

This is what I did.

However, some items are not numbered. (Can’t upload anymore images due to noob restrictions)

Results after running Dynamo Script

The Elements from the Boolean filter node output (IN) need to be the ones you feed to the Set Parameter node input (element).

Thank you very much. :slight_smile: