Get (row)Index from IEnumberable.UiElement

Hello,

i need help.

Following Case:
I use the activity find children to get data from a list from a application.
In the output (IEnumerable UIelemet) exists more than 30000 list items.
(It is not possible to extract this infomations into a datatable or something else)

The Question:
Is possible to get the list(row)Index of an specific value?
without using a for each loop?

the search value should match with the Listattribute “text” wich i can get from
the activity get attributes.

Thanks for help.
Best regards
MichaelC

Hello @michael.majcen85 , Welocome to UiPath Community

I think, It is impossible to get the index value without data table

Hello,
thanks for the fast response.
I tried to get the index with this:

int_Index = IEnumberableUielement.IndexOf(searchvalue) but it doesn´t work.
image

we can replicate a validation issue (maybe yours) when doing uiChildren.IndexOf(…
uiChildren - output from find children.

IndexOf is not e method from the IEnumerable class

You can try: uiChildren.toList.IndexOf(…

OR

give try at following using a tuple for helper structure

ListTupleElement = yourFindChildrenOutPut.Select(Function (x,i) Tuple.Create(x,i)).toList

then with ListTupleElement(0).item1 you get the first element

ListTupleElement(0).item1 you get the element
ListTupleElement(0).item2 you get the index

So it can be used later for filtering /evaluations and we recover again the index