Cannot remove this column, because it is part of an expression

Hi,

I’m concatenating the contents of 2 column to a single( new) Col and trying to remove the original columns.

But, it results in an exception Attaching my error & xaml as well…

excep

Test.xaml (10.3 KB)

Thanks…

Hi
Kindly make sure that you remove the after getting concatenated and we can use remove datacolumn activity as well

Cheers @SudhakarAs92

Hi…

Nope. It didn’t work with Remove DataColumn either. You can verify with the Xaml that was attached.

Hi @SudhakarAs92

Mai i know why you are adding c3 column and again why you want to remove

Hi

Any solution for this ? I need to remove the datacolumns after I have the concatenated column.

Col1 Col2 Col3 where Col3 is the concatenation of Col1 and Col2.

After its done I need to remove Col1 and Col2.

Could you please help ?

@UiPathMaster @Palaniyappan

We can get with DefaultView method like this

dt = dt.DefaultView.ToTable(False,”Col-3”)

This will give only the col-3 in that datatable

Cheers @Gayathri_Ramanathan

1 Like

Thanks for your swift reponse.

But I need something like removing the data columns as I have a lot of columns that are to be kept and the columns that are to be removed are comparatively less

Can you help ?

@Palaniyappan

Thanks. I did filter datatable and removed the columns …! It worked.

@Palaniyappan :smiley:

2 Likes