cancel
Showing results for 
Search instead for 
Did you mean: 

Substring values

former_member650236
Participant
0 Kudos

Hi Experts,

I am having a field value Ex: Empid : IP1234567890 THOMAS PHILIPS MARK

How can i achieve from IP1234567890 separate and name separate THOMAS PHILIPS MARK

For Empid i have given as substring properties starting 1 to 12 but for last name how can i give the values in substring because the name will be dynamically changes based on employee name so how can i add the count in substring.

Regards,

Shaik

Accepted Solutions (1)

Accepted Solutions (1)

vadimklimov
Active Contributor
0 Kudos

Hi Shaik,

You can achieve this requirement using standard mapping function substring and providing following parameters for it:

  • For employee ID: start position = 0, character count = 12;
  • For employee name: start position = 13, character count = 0.

Regards,

Vadim

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Shaik,

Like empID length is the same alway you can do your own substring function. You have an example in Eng's blog

Regards.

bhavesh_kantilal
Active Contributor
0 Kudos

Use a UDF where input to UDF is called inputString

Use the Split string as Space " "


String splitString[] = inputString.split(" ");

String IPContent = splitString[0];

String firstName = splitString[1];

String middleName = splitString[2];

String lastName = splitString[3];