Lookup value in a list and place it in other list


I try to create a dynamo script that looks up an inch Pipe size value in an excel sheet based on the Pipe Segment name and his Metric size.
In the picture below you see an example of two lists.
Now I like to search with the Pipe information from the list on the bottom for the corresponding Pipe and diameter in the list on the top and read the third item on the list so the question mark will be filled in with the right value in the Pipe list.
Then I like to update that value back to the Pipes in Revit.
Any suggestion how to do this.


You could give a try with a Springs.Dictionary.ByKeysValues from spring nodes, see here:

Hi @Yna_Db,

What I need is to search with two keys in a list and then return the value where I was looking for.
Just what you could do with lookup tables in Revit.

Filter all the rows that match (“A”) in the first column then filter all the rows that match (“15”) in the second column and read the value of the third column.

Hello Robert,

Good to see you on the forum :slight_smile:
I think Yna is pointing in the right direction. Is this what you need?:

By concatenating the first 2 items in the list you can create unique keys to search the other list.



Another way with the concatenation approach suggested by @T_Pover

20170112-1.dyn (10.3 KB)


Dear Vikram thanks a lot for all your good work towards the well of dynamo community.
do you know how to get around this warning?

Please create a new topic, this thread was finished 2 years ago and uses different version of Dynamo with different syntax. You can link to this thread in your new one. A new topic keeps things organized and lets you choose a solution so others with the same problem can get the correct answer.

The reason you get an error is because of changes in Dynamo syntax between versions. I would be happy to help you figure it out in your new topic.

1 Like