Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All
I have data as below following example
MANISH
But i need in the result
Manish
I use the function StringHandling.DOWNCASE(row1.Name) that gave me "manish" as an answer. But i need first letter as caps, can some help me in this?
Thanks In Advance
Manish
Please try below method
The code is as below.
row1.data.substring(0,1) StringHandling.DOWNCASE(row1.data.substring(1,row1.data.length()))
Please note that you will have to add additional null check conditions for this flow. I am leaving it to you as you are quite familiar with null handling 🙂
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Please try below method
The code is as below.
row1.data.substring(0,1) StringHandling.DOWNCASE(row1.data.substring(1,row1.data.length()))
Please note that you will have to add additional null check conditions for this flow. I am leaving it to you as you are quite familiar with null handling 🙂
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Thanks @nthampi
That code worked , but i have requirement in some case we will 2 words or more than 2 words in the string, So I need to populate first letter of every word as capital, For that i written on java routine it worked, But am still thinking can we write an expression in tMap.
Please look at the screen shot attached
For to generate first tab result in yellow highlighted i used the Code from which you sent, to generate second tab which is yellow highlighted i used java routine.
Can you please let me know if we can handle multiple words with a tMap expression to populate first letter as capital and rest as small ?
Thanks and Regards
Manish
In this case, a routine is the neat method as you can encapsulate the complex parts within the routine and call just as a function inside tMap.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂