Hi, how can I initialise a datatable without using the build datatable activity and set the default value aswell as the column header values in one variable?
Like this:
DataTable Var = New System.Data.DataTable [Column name] {default value}
Etc…
I hope that makes sense? I need to initialise and set value in one go
Fine
to initialize a datatable in variable panel create a variable named dt and with type as System.Data.Datatable and default value as New System.Data.Datatable
and inside the studio use INVOKE METHOD like this
but that would make the process too complex buddy
thats why build datatable activity where introduced
but still if we want to do so
i would recommend to do that only for few columns and rows
and to pass variables to those column created use assign activities like this Once after adding rows similar to that of column created with invoke method dt.Rows(rowindex)(“yourcolumnname”) = “yourvalue”
or dt.Rows(rowindex)(columnindex) = “yourvalue”
where both row index and column index starts from 0 for first row and first column