Remove duplicate values from Find Children and write it into Excel

When I use Find Children. Im getting duplicate values and space between two lines for eg
MicrosoftTeams-image (120)

w-10
w-10

w-11
w-11

and so on.
I want to remove duplicate values and line space and click on the form the forms can vary it can one or more than one.

I also want to store that value in excel in this format:
image

I dont need “Add new Employee also”

Can anyone please help

@Bhushan_Nagaonkar

Assign cleanedData = outputElements.Select(Function(e) e.Get(“innertext”).ToString.Trim).Distinct.ToList

And I also want to click on that form and extract certain data is that possible?
MicrosoftTeams-image (121)

Every form has same template. I want to extract and write into excel


Im getting this error

@Bhushan_Nagaonkar

Is CurrentItem is the find childern activity output, If its not give the find childern activity output

Yes. I have passed current ITem. As you can see. Or i did it wrong.
Following is my code
currentItem.Select(Function(e) e.Get(“text”).ToString.Trim).Distinct.ToList

@Bhushan_Nagaonkar

CurrentItem Datatype is IEnumerable of UiElement which stores the find childern activity output

Hi @Bhushan_Nagaonkar ,

I believe you are using a For Each activity and the instance currentItem is created within it.

You would require to use the variable which is passed to the For Each activity as a List.

Also, the Expression would eliminate the use of For Each activity, we would not need to use it.

Is it correct then or should I modify this expression

Ok, Thanks I will pass that value.