If vs Else If datatable issue

I have FailedListDT datatable which sometimes returns zero records. If it contains any data, I had to do some operations.

FailedListDT.Rows.count > 0

this condition works fine in “If” activity. But its throwing Else If: The source contains no DataRows. error in “Else If” activity.

can you please fix this?

System->Activities->Statements->“If” activity
Workflow->Control->“Else If” activity

Hi!

Could you please provide your input and expected output?

FailedListDT.Rows.count > 0

If your Data Table rows >0 then block will executes else else block will executes.

before going forward could you please check is your data table contains how many rows. this will be done in debug mode

FailedListDT.rows.count+1( add header is unchecked)
FailedListDT.rows.count+2( add headers is checked)

If you’re getting the row counts while in debug mode. you’re in correct path.

and also could you please mention the error what your getting while performing the operation?

Regards,
NaNi

Thanks for reporting this. We will fix this bug in a future patch

1 Like

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