I have some values that are looped through for each and now I want to split the value in order to perform a type into activity but I’m getting an error.
The value is like: V2527466300200:D8518 and I need to get the split value as V25274663002 so that I can type into it to some desired field.
Please let me know how to do that! If there is specific code to assign to a split function then please let me know.
Yah it can be done like this
—once after getting the datatable from excel with read range activity with a variable named dt
Use a FOR EACH ROW activity and pass the variable dt as w
—inside the loop use a assign activity like this str_input = IF(row(“yourcolumnname”).ToString.Contains(“:”),Solit(row(“yourcolumnname”).ToString,”:”)(0).ToString,row(“yourcolumnname”).ToString)
The we can pass this str_input as input to TYPE INTO activity
Cheers @vishnu_prasad21
use assign in_String = “V2527466300200:D8518”
out_String = in_String.Split(":"c)(0)
you will get output is V2527466300200.
and then use out_String variable where you want.
Fine
In that case the expression be like this str_input = IF(row(“yourcolumnname”).ToString.Contains(“:”),Solit(row(“yourcolumnname”).ToString,”:”)(0).ToString,row(“yourcolumnname”).ToString).ToString.TrimEnd(“00”)
Thank you @Palaniyappan the first code works just fine the output is correct. The second code has some compiling issue. But it worked with the first code.