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)