Split the particular data which are available in excel

How can i split the particular value which i need, suppose a policy number is having member id and client number but i want to take only client number.
excel
In the above screen shot i have Serial number_member number_Client number. I want to take only Client Number i.e.562897. How can i take. please suggest.

@ramkrishna2k3

Two simple solutions for you

  1. Using Split function in Assign Activity
    Client_number = “456_012546_562897”.split({"_"}, stringsplitoptions.none).lastordefault

  2. Regular expression in Assign Activity
    Client_number = system.text.regularexpressions.regex.match(“456_012546_562897”,"\d+$").tostring

ranjith, Thanks for reply, but still getting Blue error, can you shown in example.

1 Like

I will try to explain step by step -

  1. create one variable with datatype “array of string” and one variable with datatype “string”
  2. Assign - arrNumber = “your number”.split({"_"}, system.stringsplitoptions.none)
  3. Assign strClientNumber = arrNumber (2).tostring

hi,
I dint understand 2,3 line. can you please elaborate.

For 2nd line
arrNumber is a variable that I have taken with datatype array of string. Take assign activity and assign arrNumber to the the written line.
For 3rd line
I have created one string variable, strClientNumber , and assign the arrNumber (2)

@ramkrishna2k3 there is a typo in the syntax. I have modified it, now you can try the solutions

Hi,
Though I have not got any error when i applied your expression, but when i applied for output getting error like Index was outside the bounds of the array.

Main.xaml (6.1 KB)

Check this , i have created one sample for your case

it was cool but i am not getting through excel actually i need the value to be put in terminal AS400, which will fetch the value and post in mainframe AS400. Thanks for reply.

@ramkrishna2k3 you have asked for the solution that how to extract the client number from the available number and I have provided the solution for the same . :slight_smile:
Rest additional information you are providing now , was not provided at that time .
Please upload your sample input and in sheet 2 , you provide desired output, than it will be easier to understand your requirement.