The source contains no datarows in assign

Hi Community,

I am facing issue with the data which throwing error as no data row, but the data is visible still showing no data row.

can you please suggest for the resolution

(From row In dtMIADeceased Where
(row(“Paid”).ToString.Trim.Equals(“4”) And
Not row(“PRODUCT ECL”).ToString.Trim.Equals(“UT”) And
Not row(“MORT/RETAIL/OD/RSME”).ToString.trim.Equals(“OD”) And
Not row(“Interest Bucket”).ToString.trim.Equals(“Y”) And
(Not row(“NEW REGION”).ToString.trim.Equals(“SBH”) And Not row(“NEW REGION”).ToString.trim.Equals(“SWK”)) And
(Not row(“CATEGORY”).ToString.trim.Equals(“SMALL”) And Not row(“CATEGORY”).toString.trim.Equals(“OTHERS”)) And
row(“LOR LAST MONTHS”).ToString.trim.Equals(“”) And
(Not row(“UDF Tagging Account”).ToString.trim.Equals(“AKPK”) And Not row(“UDF Tagging Account”).ToString.trim.Equals(“BANKRUPT”) And
Not row(“UDF Tagging Account”).ToString.trim.Equals(“DECEASED”) And Not row(“UDF Tagging Account”).ToString.trim.Equals(“COMPLAINT”)) And
(Not row(“UDF Tagging Customer”).ToString.trim.Equals(“AKPK”) And Not row(“UDF Tagging Customer”).ToString.trim.Equals(“Bankrupt”) And
Not row(“UDF Tagging Customer”).ToString.trim.Equals(“Deceased”) And Not row(“UDF Tagging Customer”).ToString.trim.Equals(“Complaint”)) And
row(“Bankruptcy Filteration”).ToString.trim.Equals(“”) And
row(“Deceased Filteration”).ToString.trim.Equals(“”) And
row(“Complaint Filteration”).ToString.trim.Equals(“”) And
(Convert.ToDecimal(row(“Current Balance”)) > 30000.00)
) Select row).copytodatatable

Hi,

you are getting this error at the time Filtering DataTable using query.

You can use Filter DataTable activity and then it won’t give such error.

HI,

If there is possibility the result has no datarow, it’s better to use DataRow array and use ToArray method instead of CopyToDataTable in LINQ. Then use check size the DataRow array and use copytodatatable if thers is one or more rows.

arrDR=(From row In dtMIADeceased Where
(row(“Paid”).ToString.Trim.Equals(“4”) And
Not row(“PRODUCT ECL”).ToString.Trim.Equals(“UT”) And
Not row(“MORT/RETAIL/OD/RSME”).ToString.trim.Equals(“OD”) And
Not row(“Interest Bucket”).ToString.trim.Equals(“Y”) And
(Not row(“NEW REGION”).ToString.trim.Equals(“SBH”) And Not row(“NEW REGION”).ToString.trim.Equals(“SWK”)) And
(Not row(“CATEGORY”).ToString.trim.Equals(“SMALL”) And Not row(“CATEGORY”).toString.trim.Equals(“OTHERS”)) And
row(“LOR LAST MONTHS”).ToString.trim.Equals(“”) And
(Not row(“UDF Tagging Account”).ToString.trim.Equals(“AKPK”) And Not row(“UDF Tagging Account”).ToString.trim.Equals(“BANKRUPT”) And
Not row(“UDF Tagging Account”).ToString.trim.Equals(“DECEASED”) And Not row(“UDF Tagging Account”).ToString.trim.Equals(“COMPLAINT”)) And
(Not row(“UDF Tagging Customer”).ToString.trim.Equals(“AKPK”) And Not row(“UDF Tagging Customer”).ToString.trim.Equals(“Bankrupt”) And
Not row(“UDF Tagging Customer”).ToString.trim.Equals(“Deceased”) And Not row(“UDF Tagging Customer”).ToString.trim.Equals(“Complaint”)) And
row(“Bankruptcy Filteration”).ToString.trim.Equals(“”) And
row(“Deceased Filteration”).ToString.trim.Equals(“”) And
row(“Complaint Filteration”).ToString.trim.Equals(“”) And
(Convert.ToDecimal(row(“Current Balance”)) > 30000.00)
) Select row).ToArray

Regards,

Hi Yochi

i tried the same method which you suggested. i think it worked with the condition.

after filtration it taken as zero.

HI,

Probably it’s necessary to review your LINQ expression if the result of filtering is not what you expect.

Regards,

yes true, in if condition it went to else condition as dtMIADeceased.Clone and exit from the condition.

HI,

If possible, can you share your input file and expected output? It’s no problem if dummy data.

Regards,

HI Yoichi,

for this process there is multiple input files and which filter and merge the things.

after filter data that will be created the output file. according to these filter output file will again extract data from Mainframe system.

Regards,

have a look here: