Raja.G
(Mr.RPABot)
June 26, 2024, 4:55am
1
Hi Team,
I have two datatable i want to add one datatable duplicate column to another ,
If add column i used duplicate column not acceped
or else i want to rename all the duplicate value
for example :xxx, xxx1, xxx2
Please help me anyone for this
Input:
Expected output:
Or
Regards,
Raja G
Hi @Raja.G
As of my knowledge, We cannot able to add the same header names in the datatable.
Hope it helps!!
Raja.G
(Mr.RPABot)
June 26, 2024, 4:59am
3
hi @pravallikapaluri ,
Please help me to duplicate row value and add the column
Raja.G
(Mr.RPABot)
June 26, 2024, 7:57am
4
Hi Team,
Please anyone help me for this.
Regards,
Raja G
Hi @Raja.G ,
Could you maybe also provide us with another Sample Data where the input will contain more than 1 row and let us know what should be the expected output for that case ?
vrdabberu
(Varunraj Dabberu)
June 26, 2024, 8:03am
6
Hi @Raja.G
Check the with the activity available in the marketplace:
Regards
Here’s a simple workflow of how you can rename the duplicate column names:
DataTable_RenameDuplicateColumnNames.xaml (14.8 KB)
1 Like
Raja.G
(Mr.RPABot)
June 26, 2024, 10:06am
9
Hi @supermanPunch ,
If more than one or more it will add duplicate value should 1,2,3,4 like that
xxx1,xxx2,xxx3…
Regards,
Raja G
Raja.G:
@Raja.G ,
Apologies. I was asking about the datatable containing columns abc, dcr, omn. What if this datatable had more rows ?
Raja.G
(Mr.RPABot)
June 26, 2024, 10:56am
12
Hi @supermanPunch ,
If more rows datatable1 not a problem we should add always lastrow of duplicate column and value in datatable 2
Hi @Raja.G ,
Could you maybe check with the below workflow :
DT_AddDupColumnsIncremented.zip (9.2 KB)
Assuming datatables are already present in memory with the same formats.
We can get the columns that are to be added by grouping the column names if there are duplicates.
Next, we can loop through the grouped datatable rows and add column to the Input datatable. Duplicate column names checks are being done and the column number is incremented accordingly.
There maybe alternate ways of performing as well. Let us know if this does not work for your case.
1 Like
Raja.G
(Mr.RPABot)
June 27, 2024, 6:11am
14
Hi @supermanPunch ,
I need datatble 1 is single row no need two rows and if non duplicate value came that also should add to datatable 1.
Dt1:
Dt2:
Expeceted output:
Please help me on this.
Regards,
Raja G
Hi @Raja.G ,
The Datatable 1 is created using the Build Datatable
activity, you can delete the second row in it.
The handling of multiple rows is also done in that workflow, if your data always contains a single row, It should work as well.
1 Like
system
(system)
Closed
June 30, 2024, 8:14am
16
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.