I’m trying to create a results file that will record if a row from my input file was completed and the actions taken through out the process. I’ve tried creating a Data table and using Add data row activity to record the information in the data table. Then write to an excel file but im getting errors for my Variables being generic value. which i assume cant be used in a data table. Anyone know a solution to this?
So I would convert the Generic value variables to a string variable. What activity would I use to do that? The assign activity? Thank you for the quick help.
I’m still getting the same error. After using the assign activity to convert the variable to a string variable. I use the add Data Row activity to move the string variable to the data table but i’m getting the “Value of type ‘String’ cannot be converted to System.Data.Datarow” error still.
If you are adding the CaseID to the first column in your datatable, you should enter it into the ArrayRow property instead of DataRow property and surround it with {curly braces}.
So it will look like ArrayRow: {CaseID}
If it is a different column, you can provide empty strings until you get to the correct column. For example if you want CaseID in the 3rd column and the first to columns to be blank, it would look like this. ArrayRow: {“”,“”,CaseID}
Fine now worris buddy
The issue is very clear and precise
–First, CaseID is a generic variable but it is assigned to a Datarow property in Add Data Row Activity
–Next to pass the value to the datatable with add data row, where we have in individual values as string or generic and not as datarow then we can still pass those values to the datatable with add data row Activity under Arrayrow property between {}
Like this {Variable1.ToString, Variable2.ToString,…}
Here i have mentioned as string, we need to mention the datatype as per the column type…each value will go to the corresponding column position I. E., Column jndex starting from 0
So it means the number of values must be equal to number of columns
Thats all buddy you are done
Kindly try this and let know whether this works or not
Cheers @Marc757