Get the item index number of a string within a list


I’m very new to Dynamo. …Is there a way find the index number of a string in a list? Here is a screen shot of my excel file.






The reason I am doing this is because the output excel file sometimes does not come in this order Apple/Banana/Grapes/Orange.
Some cases it would be Apple/Orange/Banana/Grapes etc. But I would always want the value of Banana whatever order it’s in. And then with the results
use the “List.GetItemAtIndex” node. Could somebody please point me to right direction. Any help would be appreciated…Thanks in advance


Hi Paul,

Welcome to the world of Dynamo. Use “List.ContainsItem” with lacing to longest along with “FilterByBoolMask”. Good Luck!

Hello KulKul,

Thank you!..I saw this but the word “item” threw me off so I did not try it out. I searched all the nodes that contain “List” and “String” in it. Good this will keep me going.

Thank you very much!


No Problem, My pleasure!!!


I’m getting different results. This is Revit 2015/Dynamo 9.0…Any ideas why?


Hi Paul,

Your List.ContainsItem needs lacing set to longest to match Kulkuls graph.



Got it. Now it works. Thank you!..I didn’t even know about “Lacing” until I right click the node. I got a long way to go.


No worries, Paul :-).

Lacing is confusing, and it takes time to understand :-).