# Why is indexof and/or == not working

What am I doing wrong

I defined a point.bycoordinates (x=7500, y=2500, z=0) now i want to check if this point is in the list an what it’s index is.
The list is a list of points (point.Bycoordinates) [1] is the one we need.
But index of is saying the point doesn’t exists and the == is saying that all the pionts match, or am I seeing it wrong.

This logic is a lot harder then i thought.

For the second one, I believe that ‘==’ can only process one input, not a list. If you want to use it for a multi-item input, use a formula node with the following:

a==b

And it should work.

You’ll have to use List.Map for the IndicesOf as it will have to be mapped over an entire list. Try searching for some posts by Andreas Dieckmann on the forum and they should point you in the right direction (Similar to the above logic in terms of mechanics).

I was just having a similar problem with IndexOf. This node works with a list as input, so there’s no need to use List.Map, correct? However it returns an integer, not a list as the output, so you only get the first occurrence. I have no clue how to retrieve the list of occurrences. Here’s a simple example that I can’t figure out:

As for the == node: since it has lacing options, doesn’t that imply it works on lists?

List.AllindicesOf was in the latest daily. I don’t know how long its been around…

1 Like

Sol the hint on the formula gives me al list of null’s

But i found the solution in this post, couldn’t find it yesterday

http://dynamobim.com/forums/topic/find-index-of-matching-value-in-sublist/