Door Numbering (Always Use ToRoom but use FromRoom if Null)

So My Goal is number the door base on their ToRoom Number, but if a door’s value of ToRoom is Null theyll be use or numbered base on their FromRoom

I Tried using If Node, but it use the whole FromRoom every time theres a null on my ToRoom.

Can Someone Help me or like give me some references that can help, Thank you


I also tried code block but im not really good with it

Some of this might not make sense as we don’t have any context on what you’ve already wired in. Always best to export the canvas to image so you don’t have to worry about the cropping - we’d get the full view that way.

After the List.GroupByKey for the ‘ToRoom’ grouping, using a List.FilterByBoolMask where the groups is the list, and the mask is checking if the unique keys are null.

The “in” from that node goes into the method you used to do the List.GroupByKey for From room - assuming there is a Door.Rooms node from a list of doors which has the FromRoom wired in the Key to the List.GroupByKey node and the same list of doors passed into the List.

2 Likes

Hi, It actually help me formulate a better approach, instead of using a single setparameterbyname. i used 2 and group the doors that doesnt have null and those who have.

1 Like