Datatable row data to split in other column if found space

uiautomation
activities

#1

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.

image

thanks in advance


#2

@sid_crpyt
Can you explain some more about your requirement with an example.

Regards,
Mahesh


#3

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


#4

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


#5

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
image


#6

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


#7

@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