Hi,

I have a datatable which has 3 columns, I want to split row cell details if found empty space between two strings and store it into another column.

thanks in advance

Hi,

I have a datatable which has 3 columns, I want to split row cell details if found empty space between two strings and store it into another column.

thanks in advance

for i=0 dt.rows.count

assign dt.rows(i)(cpt)=split(dt.rows(i)(cpt))(0)

assign dt.rows(i)(newcolumn)=split(dt.rows(i)(cpt))(1)

next

for i=0 dt.rows.count

assign dt.rows(i)(cpt)=split(dt.rows(i)(cpt)," β)(0)

assign dt.rows(i)(newcolumn)=split(dt.rows(i)(cpt),β ")(1)

next

Hi Manish,

Datatable has few rows , I want to split β092616 092616β so the value after space " " will be in other column suppose X.

so the output would be

dt as datatable

Dos as column

x as new column

i=0

while i<dt.rows.count-1

assign dt.rows(i)(dos)=split(dt.rows(i)(dos)," β)(0)

assign dt.rows(i)(x)=split(dt.rows(i)(dos),β ")(1)

i=i+1

loop

@sid_crpyt

I think this might solve your requirement.

Suppose if the column contains some values with space and some without space , The new column will have empty value with respect to the value where space is not there, and first value with respect to the value where Space is there.

First I am getting the Column Index whose values have space.

test.xaml (18.7 KB)

Regards

Mahesh

1 Like

Hi @MAHESH1

Hi bro.

I have DataTable as below pictureβ¦ How to split, convert it into INT and then get lowest value ?

Thanks you!

Hi @trunghai

Let us take you saved that datatable as dta and the column name as Value.

Use the below query in Assign Activity.

Int MinValue = (From p In dta.select() SelectConvert.ToInt32(p(βValueβ))).ToList().Min

Regards,

Mahesh

1 Like

Thanks you bro @MAHESH1

But it has something incorrect as below . This command has βpβ variable right ? And what is variable kind of it ?

Can you please tell the error