Sky
(Meng)
June 4, 2018, 2:58am
21
I have resolve the problem by the following method.Pls refer to.
str_ClientInfor = clientInfor.ToString
parts = str_ClientInfor.Split({“:”,“Client”}, StringSplitOptions.RemoveEmptyEntries)
clientInfor is generic
str_ClientInfor is String
parts is a string array
this is the result.
Parts(Index) Value
0 ID
1 RU90268
2 Name
3 Veda Blaylock
4 Country
5 Germany
9 Likes
gaurar
September 26, 2018, 12:02pm
22
Could you please help me on this one…i am stuck here
Aishwarya28
(Aishwarya Gupta)
October 3, 2018, 7:43pm
23
Hi, are you still looking for help or is it resolved?
gaurar
October 4, 2018, 9:55am
24
@Aishwarya28 - thank you so much for asking, I am still looking into it…
Aishwarya28
(Aishwarya Gupta)
October 4, 2018, 10:08am
25
Hi @Gaurar ,
I have used split function as I find it very easy to understand.
Use get text to captue whole client detail section (which includes client id,name,country)
And then split it to get desired text.
Do let me know if you are familiar with this functionality, else I will write the code here.
1 Like
megharajky
(Megharaj Yadravi)
October 4, 2018, 12:50pm
26
I tried a stupid and simple way as it was fixed values to use as per below flow…
First Split the string and later get only required values from Array (result of slipt)
[StringArray] = [string].Split
[required data] = StringArrayAs(2)+“-”+StringArrayAs(6)+" “+StringArrayAs(7)+”-"+StringArrayAs(11)
1 Like
gaurar
October 4, 2018, 3:56pm
27
If you write the code that would be of great help!
Aishwarya28
(Aishwarya Gupta)
October 5, 2018, 8:21am
28
[StringArray] = [string].Split
[required data] = StringArrayAs(2)+“-”+StringArrayAs(6)+" “+StringArrayAs(7)+”-"+StringArrayAs(11)
The response given above by @megharajky is perfectly fine. Please try this.
2 Likes
Aishwarya28
(Aishwarya Gupta)
October 5, 2018, 8:24am
29
Here, [string] is the output of gettext activity.
[stringarray] is a variable of datatype=array of string that you need to create.
and then use ‘write line’ to see different values of stringarray(#) to see what value is at which index, and select the required data.
1 Like
meela
(Mounika)
October 8, 2018, 2:17pm
30
Hi@Prabu_visu
I took Div as the output of get text activity.I declared Div of type String.When I perform String operations i am getting below error.
Can you please help me with this.
Thanks
Mounika
What is the error can you over on the icon and show?
meela
(Mounika)
October 8, 2018, 2:58pm
34
This is the error am getting at the output of get text activity.
Actually String is not the output type for Get Text, it gives a GenericValue
Change your variable type and the error should go away
meela
(Mounika)
October 9, 2018, 6:44am
36
When I change the variable type to Generic value,am getting below error at string manipulation
Thnaks
Mounika
But why are your using index of?
If you are trying to get the values, you need to use string manipulations to get the ids.
varunpantv
(Varun Pant)
November 20, 2018, 7:41am
38
parts=str_ClientInfor.Split({“:”,“Client”}, StringSplitOptions.RemoveEmptyEntries)
parts(2).ToString+“<>”+parts(4).ToString+“<>”+parts(6).ToString
Works for me.
Sine
(Klingsholm)
December 17, 2018, 12:16pm
39
Hi @sreekanth
I hope you can help me, as it seams that you have great insights.
I have decided to solve get client id etc by using string manipulation as you can see on the first picture. The first picture shows the last assign stage, but I am not sure how that should look like. Any ideas?
Hello,
I just wanted to understand, if I want to split the data below, how would you possibly change this statement?
Name: xxx xxxx
Address: xxxx, xxxx
City: xxxx
There is no common word ‘Client’ preceeding like in your case.
Thank You,
Anusha
varunpantv
(Varun Pant)
December 18, 2018, 7:13am
41
Just splitting on “:” here.
And then taking the rest from the array.