Hi @mohan_dugganab, just to clarify, JOHN SMITH EXAMPLE is all in the firstname field. And it can be more than 3 words.
Thanks 🙂
It's strange to see that there are multiple words in first name.
Below is a simple example and you can expand on it using additional functions like listSize (if needed)
if ( indexOf("MOHAN DUGGANABOIENA"," ")>=0 )
then
(
(upper(substr(getListItem(split("MOHAN DUGGANABOIENA"," "),0), 0, 1))) + (lower( substr(getListItem(split("MOHAN DUGGANABOIENA"," "),0), 1))) + ' '+ (upper(substr(getListItem(split("MOHAN DUGGANABOIENA"," "),1), 0, 1))) + (lower( substr(getListItem(split("MOHAN DUGGANABOIENA"," "),1), 1)))
)
else
(
(upper(substr('MOHAN', 0, 1))) + (lower( substr('MOHAN', 1)))
)