I would like to change the parameter “Name” that my doors have. I linked the door together with the room and a sequence list for the letters.
The first step works fine, but what I really need is that for each room to start with the letter “a” and if the room has more doors the sequence continues accordingly.
“Door1: Room2_a”; “Door6: Room8_a”; “Door11: Room3_a”; “Door2: Room2_b”; “Door3: Room2_c”; “Door4: Room1_a”
Use a List.GroupByKey node where the Doors are the list and the to room values are the keys.
Use the grouped lists of doors to generate the alphabetic sequence. Lacing will matter here - likely wants to be set to longest.
Use a String.Join node to add the room name (the unique keys value of the group by keys node) to the alphabetic sequences.
Set the grouped element lists by the grouped value lists or flatten both to set them.
Might wanna review those “(None)” values too as I doubt you want “(None)_a” as a name. A code block to replace them with another value like “exterior” is possible. Something like this perhaps, though I can’t test it right now so I may have miss typed. Input A should be your ‘to room’ value, and input B should be your ‘from room’ value, or perhaps just “Exterior” if you know all doors without a “to room” are exterior doors. A=="(None)"? B: A;