List.IndexOf returns -1 value


who can help me?

then how can I get a -1 result when I filter on a list of booleans?

Thank you very much for thinking along.

An index of -1 means that the value does not exist. In this case, it means the sublist at index 23 has no true value.


Hi Nick,

The list consists only of true and false values.

Somehow Dynamo turns some false values ​​into -1.

You’re using List.IndexOf to check each sublist for a true value. The -1 states that the sublist at index 23 in the original list does not have a true value. You can confirm this by pulling out sublist[23] specifically and checking it.

1 Like

aha I see what you mean…

1 Like