Luegisdorf
12/13/2005 2:18:00 PM
Hi Roman
You can just use a Map:
Map map = new Map (Types::string, Types::void);
while select any tables which emplId
{
if (! map.exists(any table.emplId))
{
map.insert(any table.emplid, null);
}
}
Use a MapIterator to iterate all Keys.
Best regards
Patrick
"Player" wrote:
> If you work with a container, you've got the conFind() function, but for
> an array... :-S
>
> Roman Kucko wrote:
> > Thank you for the answer, but it is not what I ment.
> > I think there should be a function telling if an element is already in the
> > array or the array still doesn't have such element.
> >
> > I'll explain it in other words: I have an array:
> > EmplId EmployeesWhichAreInterestingForMe[];
> > then I am going through all the projects, counting their revenues, costs (in
> > specific way) and then I add that Employee to the array, but when I add that
> > employee to the array - he might already be there - so I have to check if it
> > is there or not.
> > I need an analogy of function
> >
> > boolean in_array(TypeOfElement _elementToSearchFor, Array _arr)
> > {
> > returns true if one of array _arr elements is equal to
> > _elementToSearchFor and returns false if array _arr does not have the
> > _elementToSearchFor in it;
> > }
> >
> > Having such functions in C, C++, PHP, Delphi, etc... it is so obvious to me
> > that there MUST be such function in Axapta :)
> >
> > Roman
>