ShareFile

First Name/Last Name Combine & Separate in Podio Calc Fields

The objective is to:

  1. Combine first name and last name fields into a full name.
  2. Separate a full name into first and last name fields.

This can be done using JavaScript in Podio calculation fields to manipulate the name fields.

OR

You can Use PHP in Podio Workflow Automation(PWA)

Examples

Calc Field JS

  1. Combine First/Last Name Fields into Full Name:

    @First Name + " " + @Last Name
    <!--NeedCopy-->
    
  2. Split Full Name into First/Last Fields

    First Name = @Full Name.split(' ').slice(0, -1).join(' ')
    
    Last Name = @Full Name.split(' ').slice(-1).join(' ')
    <!--NeedCopy-->
    

PWA PHP Variable

Split Full Name into First/Last Fields

First Name = (strpos( Contact-Field , " ")) ? (substr( Contact-Field , 0, strpos( Contact-Field , " "))) : ( Contact-Field )

Last Name = substr( trim( Contact-Name-Field ) , strpos(trim ( Contact-Name-Field), " ") +1)
<!--NeedCopy-->
First Name/Last Name Combine & Separate in Podio Calc Fields