So, the other day I was trying to use Find in Array , but it wasn’t finding anything. At first I thought there was wrong with the data I was feeding into Find in Array, but then I did a quick test of Find in Array and found out what was going on.
By default (in 2012 SAP at least), the Epsilon is 0 and Find in Array doesn’t find anything. For example, here Find in Array doesn’t find the vector (0, 0, 0) in the array, even though (0,0,0) is in the array three times:
If you bump up the epsilon to 0.001, then Find in Array does find the specified value:
It’s often a good idea to isolate a branch, or create a simple test ICE tree, to figure out how things work.
Is this 2012SAP default value of “0” by design or is it a bug?
It’s been like that since 7.5 at least (I didn’t check 7.0).
I note the Equal node behaves the same if you put the Epsilon down to zero.
Anyways, perhaps the default Epsilon should be 0.001 for Find in Array.
I haven’t logged it yet but I’ll do that.
thx
you yeah, ive encountered this one a few times, i should have logged a bug.
impressively evil.