Name Split

shwetashweta Member Posts: 94
Hi All ,

I have one field of full name which hold the value ambrish pratap singh now i want to split the name in three fields which are name1,name2,name3now i want that name1 should have ambrish
name2 should have pratap
name3 should have singh

its urgent please help
thanks in advance
Regards
Shweta

Comments

  • kapamaroukapamarou Member Posts: 1,152
    You could try using STRPOS and COPYSTR.

    Where do you get the text from? Is there any way to get three different strings instead of one to avoid problems?
  • matttraxmatttrax Member Posts: 2,309
    Yep, just do some basic string parsing with STRPOS and COPYSTR.

    You'll need to account for special cases where you only have two names instead of three, possible prefixes or suffixes like Mr. or Jr., two middle names, etc. But the same principles apply.
  • PeterDPeterD Member Posts: 66
    Have a look at SELECTSTR and use CONVERTSTR to convert the spaces into the needed commas.
  • matttraxmatttrax Member Posts: 2,309
    PeterD wrote:
    Have a look at SELECTSTR and use CONVERTSTR to convert the spaces into the needed commas.

    Excellent alternative, although it could have some issues. If a name was entered as "First Middle Last, Jr." for example.
  • ssinglassingla Member Posts: 2,973
    Check how contact card manages the same.
    CA Sandeep Singla
    http://ssdynamics.co.in
Sign In or Register to comment.