Hi all,
I would need, starting from dt1, to find all rows present in dt2 (just the dt2 rows) that have:
if dt1 column A = “1” or “2” = dt2 column F and
if dt1 column C = “5” or “6” = dt2 column Q
thanks in advance
Hi all,
I would need, starting from dt1, to find all rows present in dt2 (just the dt2 rows) that have:
if dt1 column A = “1” or “2” = dt2 column F and
if dt1 column C = “5” or “6” = dt2 column Q
thanks in advance
your case looks more like filter case driven by a subset of values defined in dt1.
Would it be possible to bridge the requirement a bit more to the business case scenario for getting more requirement details?
Hi peter,
i have two excel file (dt1 & dt2).
After filtering the dt1 I have a set of rows.
Of these rows, only for those that have certain codes in the “Code” column (example: code = ‘300’, ‘301’, ‘302’), I need to compare them with the second excel file (dt2), and extract all rows that have 4 columns in common (example: dt1 invoice_number = dt2 n_invoice AND dt1 date = dt2 date_invoice AND so on. ). – DT1 and DT2 has different column name.
At this point I need to find all the rows in dt2 that have those conditions in common. So basically I could have 2 rows in dt1 and more rows in dt2.
if you need a more explanatory excel file let me know.
Thanks in advance
Lets assume following:
arrAVals = {“1”,“2”}
arrFVals = {“5”,“6”}
we can create described output by:
dtResult =
(From d in dt2.AsEnumerable
Where arrAVals.Contains(d("F").toString.Trim)
Where arrBVals.Contains(d("Q").toString.Trim)
Select r = d).CopyToDataTable
Empty filter result we do handle as:
[FirstAid] Handling of The source contains no DataRows exception - News / Tutorials - UiPath Community Forum
For sure arrAVals, arrBVals we let create dynamicly
The second description differs from origin case description as it talks about dates which we would handle different in the details
From first description we dont see any rules for calculating e.g. the block of 4 in the A values 1,2,4
Maybe
was setup a as a result of d1.A=d2.F AND d1.C = d2.Q as with this rule the 4 is blocked
But this would also lead that now the case can also look directly to dt1 rows for this match evaluation
About joining let us introduce. Setting rows from left side / right side datatable into a relation we have different cases: a match, datajoins, lookups. Your case looks closest to a match case which can be done by filtering