How to get client id,client name and client country from the client security hash assignment


#1


#2

Hi Amit_Malik,
you have to fetch the text out of the whole box (all key/values in one string). after that you can split the key/values by new line and colon.
System.Text.RegularExpressions.Regex.Split(input.ToString,Environment.NewLine + "|:")

You can think about to use either the quick&dirty version and use e.g. idx=1 for the value of the client’s-id or load the key/values into a dictionary to be sure the client-id/name/client-country has always the same ordering and no field will be added in future.


#3

You can try @mwerner inputs (or),You can try with this: the whole text value is generic value.Convert it to string and you can use indexof,substring to extract clientid,name,country @Amit_Malik

Thanks,
Sreekanth.k


#4

Thanks mwerner .i am getting this value using screen scraping .Could you please help me to extract all the needed information from this data .Here is my screenshot


#5

Thanks sreekanth .i am getting this value using screen scraping .Could you please help me to extract all the needed information from this data .Here is my screenshot


#6

Use Get text activity @Amit_Malik,Then convert it to string.Then use
resultid=txt.Indexof(“ClientName”)-txt.indexof(“ClientID”)
Id=txt.Substring(txt.indexof(“ClientID”)+10,resultid-10).Trim.tostring
Id is the extracted ClientId.You can extract name and country in the same way


#7

i am getting this

Now,could you please help me in extracting the needed information.from this string.:slight_smile:


#8

@Amit_Malik


#9

i am getting this error now


#10

txt is the variable which you extracted using gettext,so did you pass the same variable


#11

yes,i passed the same variable that i got from gettext activity


#12

Can you share screenshot of your workflow


#13

here it is.acmetest.xaml (6.7 KB)


#14

id@Amit try to assign to variables and then perform substring on thiss variable


#15

it is still not working:(


#16

Hi Sreekanth,

Can you please explain me , how you made these statements, so that I can do it myself for Client Name and Country.

With Regards,
V.Prabhu


#17

Thanks Sreekanth,

For Posting an example, I have found it myself for Name and Country.

out_clientname=temp.Substring(temp.IndexOf(“Client Name”)+12,tempid-12).Trim.ToString

out_country=temp.Substring(temp.IndexOf(“Client Country”)+15,tempid-15).Trim.ToString

With Regards,
V.Prabhu


#18

Hi Prabu, could you please specify that what is “tempid”? Thx!


#19

Hi ilemon,

For performing String Manipulation, I have created a temporary int32 variable “tempid” and “temp” is the output of the GetText Activity.And assign it like below:

tempid=temp.IndexOf(“Client Name”)-temp.IndexOf(“Client ID”)

With Regards,
VP


#20

Thank you Prabu!~