thima
(Himabindu)
March 21, 2021, 11:54am
1
Hi All,
I will get input file from datatbase i need to check input file file columns “Saled_order_id”, "Directory_number with previuos day report if sales order present in the previous day report i need to check "directory numbers coulmn if same directory numbers then i no need to add to queue if new directory numbers present for that sales order then only i have to add sales orders to queue. how to do this.
Process3Input.xlsx (122.8 KB) HVDSReport.xlsx (8.0 KB)
can same one help on this.
Regards,
Hima
Manish540
(Manish Shettigar)
March 21, 2021, 12:35pm
2
Check this below code, @thima
Put this below query in If - condition,
NewRecordDt.AsEnumerable.Where(Function(r) Not( DatabaseDt.AsEnumerable.Any(Function(m) m(“Saled_order_id”).ToString.Trim.Equals(r(“Saled_order_id”).ToString.Trim) And m(“Directory_number”).ToString.Trim.Equals(r(“Directory_number”).ToString.Trim)))).Count > 0.
Then - You can add all the values to queue that will be in below code,
NewRecordDt.AsEnumerable.Where(Function(r) Not( DatabaseDt.AsEnumerable.Any(Function(m) m(“Saled_order_id”).ToString.Trim.Equals(r(“Saled_order_id”).ToString.Trim) And m(“Directory_number”).ToString.Trim.Equals(r(“Directory_number”).ToString.Trim)))).CopyToDataTable()
Else - Log as No new records.
Hope this may help you
1 Like
thima
(Himabindu)
March 21, 2021, 12:51pm
3
I am getting below validation error in IF
@thima … you have added ® symbol…thats why the error…
It should be function ( r ) … remove the spaces here …
thima
(Himabindu)
March 22, 2021, 5:02am
6
NewRecordDt.AsEnumerable.Where(Function® Not( DatabaseDt.AsEnumerable.Any(Function(m) m(“Saled_order_id”).ToString.Trim.Equals(r(“Saled_order_id”).ToString.Trim) And m(“Directory_number”).ToString.Trim.Equals(r(“Directory_number”).ToString.Trim)))).Count > 0
this query always giving me “False” even though records are present in both excels
Manish540
(Manish Shettigar)
March 22, 2021, 5:13am
7
Check whether you have any new records or not in excel manually? @thima
thima
(Himabindu)
March 22, 2021, 4:06pm
9
system
(system)
Closed
March 25, 2021, 4:06pm
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.