Pushing data to sublist elements if they are "true"

Hi all,

I’m in the quest for understanding Lists Management.

In a nutshell: I want to to push the Area Number value to the Room Department parameter if the Room lies inside that Area.

I got a list of lists, that shows the rooms inside each area. Then a list of the Area Numbers values, and finally another list of the current values of the Department parameter of each room.

How can I set the Parameters of the second List only to those elements that are True on the first List of Lists?


Here you go, this may not be a good solution because I am using some fix values, I will post the another better solution.
Above solution works for your both list, first and second.

Keep using Dynamo and if you get stuck we are here to help you out.



Hi @Ritesh_Chandawar, thanks for your reply.

I can´t make it work on my graph though. What do you think is the best way to push the Area Number value to the Department Parameter of the rooms?



Will this work for you?


@Monkey_Puppet thanks for your help.

Not sure if I´m missing something. This is what I have at the beginning:

  • In group 1, you´ll see the Areas in the project and the values for its Area Number parameter.

  • In group 2, there are the Rooms in the project and the values for its Department parameter, currently empty.

  • In group 3, shows which Rooms are inside each Area.

So if a Room belongs to Area 0.01, I want its Department to be 0.01 as well. And this is what is driving me mad, how to apply those values to the true elements in a sub-list.

Thanks for your help!

So from my understanding of your inputs, your first two rooms are in area 0.02 and the second two rooms are in area 0.01. If that is true take your list from group 3 and enter it into the s input in my graph and then take your list from group 1 and enter it into the replace input in my graph (convert to string if it is not already). Then follow the rest of my graph to get a list to enter into Elements.SetParameterByName with the list of elements from your group 2.


This is tricky but do able. Below workflow is one of the way to achieve this:


This should work…


@Kulkul thanks, it worked your way. Unfortunately I can envisage lots of manual input if I want to apply this to a multi-res project.

@Vikram_Subbaiah absolutely magic, it does exactly what I had in mind. Thanks so much!!!

Could you please explain us why is necessary Filter.By:Bool.Mask the rooms before plugging them into the List.Map node? I find that step the key to understand the whole process.

Here is the dynamo task working with X number of Areas which contain random number of rooms.


You have one main list of a certain length and multiple lists of boolean masks of the same length (as sublists in another list)
In order to apply each of the different filters multiple times to the main list we use List.Map

1 Like