For each activity error in dispatcher

Hi All,

Could you please help me out to fix below error:

Can we have the complete exception details that could help us
Cheers @Shah

Hi @Palaniyappan,

Below are the details:

image

This implies that the datatable has no records in it
Make sure that the datatable has some data in it
For that use a writeline activity and mention like this
dt_workitems.Rows.Count.ToString
Which will give us the rows count and if that is greater than zero then we need to check with the scope of the datatable variable in the variable panel like it is with whole sequence or not under the column scope in variable panel
Or if that is equal to zero then we need to check the source of the datatable
Cheers @Shah

1 Like

Hi @Palaniyappan

Where do I keep the write line activity?

before to the for each row activity
@Shah

1 Like

Hello,
Have you try to use also the Build datatable activity to create your data table structure?

@Palaniyappan I did that but still facing execution issue.

Hi @ Shah,

is your for each inside de same sequence that your DataTable see in variables panel, And why is your DT Value set to --> NULL

1 Like

Is the datatable dt_workitems variable is kept with global scope in the variable panel
kindly check that once in the variable panel under column SCOPE and is with the global sequence or not
Cheers @Shah

Hi @vmariejeanne Iā€™m using data scrapping. Could you please check my project file? Process.xaml (14.0 KB)

Fine
got it
remove the writeline activity and we need to mention this datatable in the for each row loop
image

Cheers @Shah

@Palaniyappan, scope is ProcessTransaction:

Just like i say :slight_smile:

test

Try this and let know pls
@Shah

1 Like

@Luis261980 what do I need to do now?

we are almost done buddy
we have mentioned a new datatable variable and we need to mention the ExtractDatatable variable in for each row loop and not the new datatable we created
Make sure that ExtractDatatable is with global scope in the variable panel
@Shah

1 Like

@Palaniyappan, in for each loop, it is dt_WorkItems:

Should I modify it to ExtractDataTable?

yes exactly
@Shah

@Palaniyappan, observing compilation error: