How to rename row value in datatable

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:
image

Expected output:
image

Or

image

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!!

hi @pravallikapaluri ,

Please help me to duplicate row value and add the column

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 ?

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

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 ,

Apologies. I was asking about the datatable containing columns abc, dcr, omn. What if this datatable had more rows ?

Hi @supermanPunch ,

Datatable 1
image

Datatable 2
image

Expected output:
image

Regards,
Raja G

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)

  1. Assuming datatables are already present in memory with the same formats.
  2. We can get the columns that are to be added by grouping the column names if there are duplicates.
  3. 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

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:
image

Dt2:
image

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

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.