Can any one help me, need to send combinations of matched rows

Book1.xlsx (10.7 KB)
In the above excel,

HERE, for the same PR SCODE is same then we need to add to the queue
send combinations line items to the queue like

queue item 1:

Scode: 345

PR: 1

Line Items: 10, 30

queue item:2

scode:567
pr:1
Line Items:40

queuitem:3
scode:567
pr:3
lineitems:50,60,70

Hi @saritha_panguluri

Try this approach

image

(
	From row In dt_Data
	Group row By
	k1=row("Purchase Requisition").ToString.Trim,
	k2=row("Scode").ToString.Trim
	Into grp=Group
	Select dt_Queue.Rows.Add({k1,k2, String.Join(",", grp.Select(Function(gr) gr("Item of requisition").ToString))})
).CopyToDataTable

xaml for reference

SendCombinationOfMatchedRows.xaml (7.6 KB)

2 Likes

Really thank you very much @kumar.varun2

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.