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

Опубликовано: 03 Октябрь 2024
на канале: UIPath Tutorials
5,361
32

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 :   / uipathtutorials  
Instagram Page :   / uipathtutorial  
LinkedIn Page:   / uipathtutorials  
Twitter:   / uipathtutorials