Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue with string Handling Function

Hello -
Good Morning. I have a name abhishek sharma, So here I need to get the output as Abhishek Sharma
First name & lastname first letters should be in uppercase.
Any Suggestions.
Regards,
Pradeep
Labels (2)
15 Replies
Anonymous
Not applicable
Author

@ Janhess -
Thank you Very much For your help. Issue Resolved.
How did you do that ? Appreciate it , It is very tough for me to write coding part (routines), I am new to Talend, Do u suggest me some online links.
Regards,
Pradeep
janhess
Creator II
Creator II

@ Janhess -
Thank you Very much For your help. Issue Resolved.
How did you do that ? Appreciate it , It is very tough for me to write coding part (routines), I am new to Talend, Do u suggest me some online links.
Regards,
Pradeep

Googled it. You should try it!
Anonymous
Not applicable
Author

The code here will also convert the rest of the string (after the first letter) to small cap:
StringHandling.UPCASE(StringHandling.LEFT(row.Family,1))+
StringHandling.DOWNCASE(StringHandling.RIGHT(row.Family,StringHandling.LEN(row.Family)-1))
janhess
Creator II
Creator II

But it doesn't solve the problem that was raised. It doesn't convert all words.
Anonymous
Not applicable
Author

Hi,
There is a capitalizeFully method in the Commons Lang JAR that ships with Talend. The method is in a class called WordUtils. From the documentation...
WordUtils.capitalizeFully(null) = null
WordUtils.capitalizeFully("") = ""
WordUtils.capitalizeFully("i am FINE") = "I Am Fine"
This post shows how to use the Commons Lang library in a Talend tMap. For this requirement, substitute "WordUtils" for "StringUtils" and "org.apache.commons.lang.WordUtils" for "org.apache.commons.lang.StringUtils".
http://bekwam.blogspot.com/2011/01/java-libraries-in-talend-open-studio.html
janhess
Creator II
Creator II

I find it a bit of an overhead to remember to do the tLibraryLoad all the time so I converted all the Apache string Utils to Talend Routines.