Add data row show null value

Add data row dtuserreport is data table get null value.As mention in screen shot

3 Likes

Did you initialised your data table? Make sure you intialised datatable before adding data to it.

dtuserreport = new DataTable

Regards,
Karthik Byggari

4 Likes

Hi @Aditya10989

In addition to @KarthikByggari thoughts.

Can you add more details ! How did you pass the data in datarow? Did you use Build Dataable activities ?

cheers :smiley:

Happy learning :smiley:

4 Likes

thanks for reply can you please tell me how to initialised.can we do this using assign activity…?

1 Like

Intialise where you declared this.
From variables panel. Give value as new DataTable

1 Like

you mean to say like this

.
This is I already done but not work

1 Like

@pattyricarte thanks for reply yes I add this before for each loop where I create data table

2 Likes

Set Default value to New DataTable

2 Likes

@KarthikByggari This I try but not work for me

2 Likes

Okay. Remove the default value.
Add an assign activity after Build Data Table activity in your workflow.

Assign Activity, dtuserreport = new DataTable

1 Like

@KarthikByggari try but not work got null value

1 Like

@pattyricarte did not work

1 Like

Use the Build Datatable activity to create the table with the column titles you want, for example, if you want 2 columns with the respective name of “ID” and “Location”.

When using the Add Data Row:

  • Add {ID, Location} into input ArrayRow property
  • Add the name of your datatable into input Datatable property
1 Like

@Fer yes I already done but not work.No one provide me solution :pensive::sleepy::disappointed_relieved:

1 Like

@Aditya10989, did you check if each of the variable you are trying to add into the row is not empty?

1 Like

you mean to say each variable is not empty they must contain any value…??

1 Like

Initialize all values before adding a row to a data table.

1 Like

yes try not work I removed all value only use two but not work.Did not got any solution

1 Like

Can you please re-arrange the activities.

First Assign Activity, dtuserreport = New DataTable
And then Build DataTable Activity.

1 Like

its not work because assign value activity value I am getting inside loop ,add data row inside loop and build data type outside the loop

1 Like