I look for index of obj in array. If it is not found : returns “-1”

if array contains obj then I want to return OBJ[index].parameter

Help me to understand how this supposed to work.

On screenshot you can see that index is “-1” (i get it from previous action in workflow)

Then I check if its <0 then return 0 OR run formula with positive index

so for index>=0 my formula works well

It returns error when index = -1

I thought IF (-1)<0 THEN return 0 should immediately 0 and do not try formula because there can not be calculated without positive index…

Please clarify what am I doing wrong here?