List. indexOf giving -1

Im trying matching two inputs but I’m keep getting -1. Does someone know the fix?
I’m using Dynamo 2.0.4 in Revit 2019. I’m using List.indexOf a few times in this script. But this node is the only one with an -1 output.

Can you check the input type of the element node. Try with converting it to string and then connect to List.Indexof

I’ve used strings. The strange part is that this scripts works in Revit 2020 and Dynamo 2.3.

But these are the nodes that I’m using.

Try with setting value “true” to ‘readAsString’ input in the ‘Data.ImportExcel’ node.

1 Like

It worked!! Thank you.