cancel
Showing results for 
Search instead for 
Did you mean: 

Utility Strings

john_shiels
Level 3
I have a text data item that stores a person name "John Doe" or can be of the format "John M Doe". However, I want to extract just the last name "Doe". I have tried Business Object "Utility String" - "Split Text". However this BO gives me the output as a collection and not as a text data item which I am looking for. Suggestion welcome.
1 REPLY 1

john_shiels
Level 3
UPDATE: There is no InStrRev function (yet) in the calculation stage.... If you don't want to go into RegEx, and you want to get the last name... Make a new object (e,g. named: Get last name) In the object make a code stage, and put the following code in: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 'IN: Full_Name (Text) 'OUT: Last_Name (Text) if Full_Name.IndexOf("" "") > 0 then Last_Name = Full_Name.Substring(Full_Name.LastIndexOf("" "") +1) end if ******************************************************************** The above worked a treat. Thank you