cancel
Showing results for 
Search instead for 
Did you mean: 

How to split one name (full name) into forename & family name

SwatiAgrawal
Level 5
Hi,
Please suggest what formula/calculation should I put in to split full name into forename & family name.
Eg: I have a data item with name - Swati Agrawal. Then how can I split this so that I get one data item as "Swati" and other data item as "Agrawal". In short, how do I split full name into forename & family name.

Looking forward to your help.
Thanks.

------------------------------
Swati Agrawal
------------------------------
1 BEST ANSWER

Helpful Answers

Ben.Lyons1
Staff
Staff
Hi Swati,

There's a really useful function in the "Utility - Strings" VBO for cases such as this. You can split strings of text by a particular character, which in this case would be a space.

The action is called "Split Text" and more information on how to use it can be found by clicking the little blue "i".

Thanks

Ben

------------------------------
Ben Lyons
Product Consultant
Blue Prism
UK
------------------------------
Ben Lyons
Principal Product Specialist - Decipher
SS&C Blue Prism
UK based

View answer in original post

14 REPLIES 14

John__Carter
Staff
Staff
One way is to use the InStr function to find the position of the space, then use the Mid function to extract the text on either side of that position. The Utility - String VBO also has a Split function.  There are also thousands of examples of string manipulation online,

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Can you show me through screenshots how to do this? I am relativey new to Blueprism. Hence, lost in between of a bot 😞

------------------------------
Swati Agrawal
------------------------------

Hi Swati
I'm using the below expression in the calculation to collect the first part of a string which is having a space.  
Mid(Trim([Data Item]),1,InStr(Trim([Data Item])," ")-1)

Actual Formula:
Mid(Value, Start Position, End Position), here we have to find the end position by finding the space (" ") in the stored value.  Given -1 to remove the additional space which will be in the output. 

Hope this helps.



------------------------------
[Manoj] [S]
[Principal Consultant]
[Infosys]
------------------------------
Manoj Sivasankaran

Ben.Lyons1
Staff
Staff
Hi Swati,

There's a really useful function in the "Utility - Strings" VBO for cases such as this. You can split strings of text by a particular character, which in this case would be a space.

The action is called "Split Text" and more information on how to use it can be found by clicking the little blue "i".

Thanks

Ben

------------------------------
Ben Lyons
Product Consultant
Blue Prism
UK
------------------------------
Ben Lyons
Principal Product Specialist - Decipher
SS&C Blue Prism
UK based

Hi John, 

How do we split the text without space?

For Example:
Text: MichaelHolding

Where,
FirstName: Michael
Last Name: Holding

------------------------------
Chakkravarthi PR
------------------------------

Hi,

There must be some logic or a rule defined first for even a digital worker to know what a first name and what a last name is. In your case, how will any digital worker know that without any separator in between ?​

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Thanks for the swift reply Dev,

Actually, the data that I have is being extracted from PDF and that is saved as a text file and we perform sting manipulation in that, 
20526.pngthis is the PDF text fields and after saving it as a text file

20527.png
We got the logic to find the string between first name and last name, but how do we separate it as FIRST and LAST name respectively?



------------------------------
Chakkravarthi PR
------------------------------

Hi,

Thanks for sharing the overall picture with us. I think the issue here is if you via this extraction route, you won't be able to really build any logic to separate first name and last name since there is practically no identifiers here as well to distinguish between the two sections. Perhaps, the way you have been extracting the text from PDF is probably what is causing this weird formatting which is going to impact the further logic.

Can you tell us what kind of PDF extraction method or which specific action have you used to get the text from PDF file?

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Hi,
 
PDF- Adobe Acrobat Reader DC.
we are considering PDF as a text (Save As Other) and then saving it to a TEXT data item(performing data extraction over that).

------------------------------
Chakkravarthi PR
------------------------------