IndexOf seems broken

Check the list structure of the code block, try to remove the curly brackets. (or change lacing to longest on index of)

1 Like

Both solutions worked but i was trying to solve a bigger problem and neither of those solutions work for that.

Is it possible to use IndexOf with List.Map to find a list of family instances in a larger list of family instances? I cant get any results other than -1 and i even tried converting the information to a string.

Hi @chueb I don’t know how your script looks at all but you could try using AllIndicaseOf node to extract the index of each element. And instead using list map you could use the levels @@ option for both list and item according your input.


this is just a sample you should adjust the levels for you!
Hope this helps.
Good luck!