when i run the process, i am getting Write Range: Object reference not set to an instance of an object: Null Value Exception
I figured out that the Add Data row is not updating the values from Get Queue Items, hence the Data Table is empty, but I do not know how to resolve it, because when i print those individual Queue items in write line, there is data on them.
Can someone please help on the issue.
Thanks in advance
before write_range activity
can you print out the value of in_config("EDC_OutputExcel_FilePath").toString ?
it might be that you dont have a value for in_config @Alekhya_Gandhi
Hello @rikulsilva , i have tried printing the Data row count. one after building the Data Table which is ‘0’ and another one after Add Data Row , that also updated as ‘0’. It should have a row in it. But it doesnt.
Hi @jack.chan,
I guess not. There is an Asset with that file path which is updating fine.
The Data Table is having Null values which is actually not. As I could see the values in all those variables in Write Line which passed to the Array Row in Add Data Row
Here is the Output screenshot
Highlight1: Data Row count after Building a Data Table = 0
Highlight2: output from Get QueueItems (writeline: QueueItems.ToString)
Highlight3: Output from QueueItems Variables Writeline (which is as expected )
Highlight4: Data Row Count after Add Data Row = 0
Can you try printing the data row count in below places
After For each queue Items
After Filter Data Table activity
I think, the filter condition is removing all the rows from the data table, if any row count is displayed after For each. then filter data table condition need to be tweaked
Put a break point at build DataTable and run you workflow in debug mode. After run, use step into in debug tab so you can go and check output activities individually in imediate pane or locals pane.
This way you also can check if try fails and catch branch do something or filter activity removes rows
Write range is not failing because of datatable i beleive…as because of build datatable there is atleast the headers present so the datatable would still be written on to excel…because if there is some issue then it would have failed in output datatable activity itself
Now coming to add data row…can you please check in your variables if there are multiple datatables declared with same name…
Hi @Venkat4 , I have tried printing the path of Output file and it is throwing Null Exception. Hence I manually added the file path, and the exception is gone now.
Still, There is no data being written into the excel since the Data row count is still 0 even after adding the Add Data Row.
As @Anil_G suggested, atleast the Column names should be written to the excel. but the sheet is empty and execution is ending without any errors
please check in variables if multiple variables created with DT_Reporter name. if multiple are created delete one variable and try to rerun the workflow.
Also, I see you have output data table activity used. please disable the activity.