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

Published: 10 August 2019
on channel: 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  


Watch video How to Concatenate & Group By multiple rows data from LINQ in Uipath online without registration, duration hours minute second in high quality. This video was added by user UIPath Tutorials 10 August 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,36 once and liked it 3 people.