How to Concatenate & Group By multiple rows data from LINQ in Uipath

How to Concatenate & Group By multiple rows data from LINQ in Uipath

UIPath Tutorials

4 года назад

5,320 Просмотров

In this video bot concatenates multiple rows data in one row following group by clause.

Linq used in video:

IEnum = (From p In dtSheet1.AsEnumerable() Group p By obj_p= New With {Key.P_First=p.Item("First"),Key.P_Code=p.Item("Pcode")} Into MG= Group Select new with { .First=obj_p.P_First,.Pcode=obj_p.P_Code,.Data_Concatenate=String.Join("/", MG.Select(Function(x) x.Field(Of String)("Data")))}).ToList

strResult = String.Join(",",IEnum(0).ToString.Split(","c).Select(Function(item) item.ToString.Split("="c)(0).Replace("{","").Trim))+System.Environment.NewLine+ String.Join(System.Environment.NewLine,IEnum.Select(Function(row) String.Join(",",row.ToString.Split(","c).Select(Function(item) item.ToString.Split("="c)(1).Replace("}","").Trim.ToString))))

Fore more videos please Subscribe our channel.
Also follow us on:
Facebook Page : https://www.facebook.com/uipathtutorials
Instagram Page : https://www.instagram.com/uipathtutorial/
LinkedIn Page: https://www.linkedin.com/in/uipathtutorials/
Twitter: https://twitter.com/uipathtutorials
Ссылки и html тэги не поддерживаются


Комментарии:

Nithya A. N
Nithya A. N - 08.09.2023 16:14

Hi it is not work with my data table

Ответить
Veera Boddula
Veera Boddula - 05.03.2021 15:45

Instead of concatenate can you give Minimum date Logic

Ответить
Aleem Khan
Aleem Khan - 20.02.2021 18:20

I am using same code but I did not get same result file row is concatenate but other is not if you are in uipath community please help me out with you name

Ответить
rpa uipath geek
rpa uipath geek - 20.02.2021 14:23

Could you please explain your query its long and confusing really appreciate you

Ответить
소개커플
소개커플 - 02.06.2020 11:11

I'd like to know how can I write the Linq as the single groupby column.

Ответить
Devula Narasimha
Devula Narasimha - 14.05.2020 20:30

Any xaml file?

Ответить
Wesley Abernatha
Wesley Abernatha - 13.09.2019 18:02

Hello, thank you for your example. I keep getting "AsEnumerable is not a memeber of System.Data.DataTable" Do you know how I could fix this?

Ответить