Skip to Content

Splitting the Name in Webi

Hi Friends,

I have field 'Name' which gives Title First Name and Last Name, I want to split Last Name and First Name in separate column in webi

Name Last Name Fisrt Name Mr Sree Viswam Viswam Sree Mrs Lucie willaim William Lucie Sir John Denmark Denmark John Miss Geetha Ramanathan Ramanathan Geetha

Could you please help in deriving the Variable, I tried substring , left and Right but seems I have not derived formula properly

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 21, 2017 at 05:39 PM

    use these formula's.

    First Name=Left(Substr([Name];Length(Substr([Name];1;Pos([Name];" "))+2);Length([Name]));Pos(Substr([Name];Length(Substr([Name];1;Pos([Name];" "))+2);Length([Name]));" "))

    Last Name=Right(Substr([Name];Length(Substr([Name];1;Pos([Name];" "))+2);Length([Name]));Pos(Substr([Name];Length(Substr([Name];1;Pos([Name];" "))+2);Length([Name]));" ")+2)

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 21, 2017 at 05:41 PM

    Hi Sreekanth,

    There may be different scenarios in this, one for sure is, if you always have a Title in the beginning of the name as Miss or Sir, lets look at that case and first create a Full Name without Title.

    v_Full Name =Substr([Full Name];Pos([Full Name];" ")+1;Length([Full Name)) (now, let's use this variable in the other variables)

    v_First Name =Substr([v_Full Name];1;Pos([v_Full Name];" ")-1)

    v_Last Name =Substr([v_Full Name];Pos([v_Full Name];" ")+1;Length([v_Full Name))

    Hope that helps.

    Thanks,
    Mahboob Mohammed

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 27, 2017 at 10:29 AM

    Hi Srikanth P,

    Use these formula's,

    First Name: =Substr([Name];1;Pos([Name];" ")-1)

    Last Name: =Substr([Name];Pos([Name];" ");Length([Name]))

    Regards,

    Pavan Sharma PSN.

    Add comment
    10|10000 characters needed characters exceeded