LOOKUP function on array?

Posted by Lieven De Foor on 20-Jun-2017 10:15

Is there an equivalent to the LOOKUP function that exists to find the position of a string in another delimeter separated string, but then for arrays (extent)?

I want to know if a certain value is already in an array, and at what index.

Yes, I know I can easily program this myself, but something like LOOKUP(myValue, myArrayVar) would have been nice...

All Replies

Posted by Peter Judge on 20-Jun-2017 10:22

Will be nice :)

Posted by Lieven De Foor on 21-Jun-2017 01:52

Haha, Peter, so I assume I haven't overlooked, this just doesn't exist?

The problem with creating something in ABL is that it requires generics to write this properly....

Posted by Lieven De Foor on 21-Jun-2017 02:47
Posted by Marko Myllymäki on 21-Jun-2017 07:17

Just to remind, while not a general solution, in some cases a usable alternative to ABL arrays is to use a .NET collection (e.g. System.Collections.Generic.Dictionary, List or Stack). They offer many useful methods for handling the collection.

This thread is closed