Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
santho_ak
Partner - Creator III
Partner - Creator III

String functions to extract only Initials from Full name

I need only First letter from First Name, Last Name & Initial. Is there any way I can create a new field like that. I tried some string functions too.

Eg: Li Xiao Ping is the my field name (Full Name)

     I want like LXP as Initials (as seperate field)

1 Solution

Accepted Solutions
9 Replies
techvarun
Specialist II
Specialist II

techvarun
Specialist II
Specialist II

    keepchar([Full Name],'ABCDEFGHIJKLMNOPQRSTUVWXYZ')

Name initials

sumanta12
Creator II
Creator II

Please try this

=left(subfield(name,' ',1),1)&left(subfield(name,' ',2),1)&left(subfield(name,' ',3),1)

tresesco
MVP
MVP

Using capitalize() would be a bit more robust, like:

keepchar( Capitalize([Full Name]),'ABCDEFGHIJKLMNOPQRSTUVWXYZ')

rittermd
Master
Master

You probably need to use SubField function with the separator being a space.  Hopefully your data is consistent that way.

The formula that Sumanta gave you looks like it would work if your data is good.

Put this in your script in the Load portion and add AS fieldname to the end.  Then this new field will be available to the app without having to recalculate each time in the app.

OmarBenSalem

Can you please close the thread by marking the right answer as so if your question has been answered?

I assume It has.

santho_ak
Partner - Creator III
Partner - Creator III
Author

Thanks for the reply @Varun. I forgot mention that the values in the field are fully in capital letters.

Eg: LI XIAO PING


Otherwise, your solution is perfect

santho_ak
Partner - Creator III
Partner - Creator III
Author

Thanks @Sumanta. Your solution works for me. Thanks. Since, I didn't mentioned that all the characters in the filed are in capital letters. I marked @Varun ans as correct.

Anyways, your solution resolved my case. Thanks @Sumanta 🙂

santho_ak
Partner - Creator III
Partner - Creator III
Author

Sure omarbensalem‌. Thanks