I don’t know what purpose of this?
Please check the follwoing thread:
Let me know if that helps.
Do reach out if you need more info on this or any pre-built example for clarity.
Read it already but still confuse with it.
Thank you for your answering i’m waiting someone who sharing an example to make me clear.
That field is an alternate field you can supply if you decide to use a DataColumn object instead of a column name. In the world of .NET (which is what UiPath uses) everything is some kind of Object and a DataColumn is one, just like a DataRow is and a DataTable is. Putting these Objects together is how things work under the hood.
If you use “Column Name” in the Activity, I’m pretty sure what UiPath does in the background is generate a new DataColumn object with that name before it appends it to the DataTable. Let me know if this helps.
This Column section would take a Variable of type DataColumn.
Alternate way of creating a column inside a datatable.
See this example, initially I had 3 columns in my dataTable.
I have used DataColumn type variable ColumnName, assigned a value to it new DataColumn(“Column4”)
And then used Add Data Column activity and passed that ColumnData Variable in here.
The outputs are as follows:
Basically say you have a datatable with four columns and you want to create a new one with same strucutre as one of the columns from initial datatable…
Then you can give that datacolumn as reference and can create it…it is used for that
If you use that then type name etc are not needed it will take fromat from the datacolumn provided
Hope this is clear
Thank you very much for the answers so… i used way like this it works!.
but, imagine if i need to create more than one columns in one execute is it possible to do it?
because after i tried to write something like this it unacceptable.
You can create only one column at one time…multiple is not possible…for that you can use build datatable activity instead
Oh!!! Thank you very much i got it.
That’ll Create only one column, you can only give one column name.
You can write an array of string and
then loop through the array and add datacolumns one by one.
Glad that I could be of your help!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.