Can anyone help with how to add data column for an existing data table and also add the dynamic data into that specific data column.
you can use add data column activity to add new column to a datatable.
while creating only you can specify the default value.
if you need to add dynamic data, you can update column using row condition
How can we use a row condition, can you explain in detail. As I am unable to process this.
As per your advise I have tried and getting an error. can you please check the below image and let us know
Hi Sangeetha,
Can you provide exception full log and also the the steps you following.
Thanks
Venkat
Hello Venkat,
I am trying with some data in the data table and wants to add status of the data in other column.
For example, we are checking with the Booking numbers and we want to know whether it is cancelled or confirmed.
column 1 Column2
Booking Numbers Status
3456 Cancelled
1234 Confirmed
5678 Cancelled
Right now we have the booking number is existing data table and now we want the column and update the status one by one at the time of execution.
Hi Sangeetha,
Okay. I hope the data type of columns is string.
When I saw your screenshoti suspect it’s not related to datatable
Can you share the exception stack trace and xaml file if you can…
You can try this by invoke code
dt.Columns.Add(“Column Name”, GetType(String))
For eah row as Data Row In dt.rows
if row("Column2’').tostring.trim.equals(YOUR CODITION) Then
row(“Status”) = yourNewUpdate
end if
Next row
Thanks @dkollyns, I think it works. Let me try.
Sorry @venkat4u, I cannot share the work flow or the file.
Can you explain why you have used trim function in for each data row
Here, we are checking whether the booking is cancelled or not and want to add one more column to Data1 and update the status. Please check the below Xaml file and also the Excel file.
DataColumn.xaml (9.5 KB)
Test1.xlsx (7.6 KB)
Ok, I’ll check, but case the booking is cancelled or confirmed what do you do?
We check with third parties on their site and then update in the excel file to get the exact report of number of bookings cancelled and confirmed.
@Sangeetha_Harika
@DIVYA_VUNJALI
Please check the attachement
DataColumn.xaml (15.6 KB)
Test1.xlsx (8.9 KB)
I believe you need get the number of your third and check with you excel file.
See the example attachement