I am trying to do an ArraySeek on the second column in a 2 dimensional array, declared as 2 by 100 strings.
With the following syntax, the only time it returns the correct value is when the item is physically in position 2 in the array.
PROCEDURE FindField(_sFieldToFind)
RESULT ArraySeek(:arrFields,asLinearFirst,"2",_sFieldToFind)
However if I do a manual linear search as below it always works.
PROCEDURE FindField(_sFieldToFind)
li_pos is int
for i = 1 to 100
IF :arrfields[2,i] = _sFieldToFind THEN
li_pos = i
break
END
END
result li_pos
I'm sure it's me not understanding something in the syntax for multi-dimensioned arrays but I've looked at the help till I'm blue in the face and still can't see what I'm missing. Can anyone shed some light on this for me please?
Thanks
David