I am having a problem where I am trying to use a For Each Row activity to add a data row when a criteria is met, however, I am getting an error that one of the column names I am trying to add does not belong to the table. See below:
I am printing the specified data table to an excel sheet to verify the column names, then I am reading it back to make sure the DT variable has values.
The Excel sheet shows that the column exists in the table.
Here I am trying to write the values to a new table using the For Each:
This is the error I am getting:
Exception Occured during Process Column ‘Co’ does not belong to table . Source Invoke BuildCompleteReport workflow: Invoke MasterQueryToCompComCensus workflow: Add data row.
I’m at my wit’s end with this. Any help would be greatly appreciated.
I am already checking the Datatable by using a Write Range activity and it is giving me the expected output. Would using a write CSV activity show me anything different? I am happy to try it.
I tried to write as CSV and it also shows that Co exists.
I just tried to use a Write Line activity and it is giving me the same error: Exception Occured during Process Column ‘Co’ does not belong to table . Source Invoke BuildCompleteReport_HRCompRpt workflow: Invoke MasterQueryToCompComCensus workflow: Write line
This is too weird. I just changed the file to have the column title “Company” and then did the same thing, it gave me the same error, so then I changed it back to “Co” and then I added a message box to show the # of rows outside of the loop, and inside of the loop. It gave me the same number.
So then I just copied the name of the data table from the arguments pane and pasted it into the For Each Row, and now it is working just fine.
The weird part is, it is exactly the same thing. The title of the argument is exactly the same…