Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
About Trim function in Actuate BIRT
Sankari
Hi all,
I need to concatenate firstname with lastname................eg(John Smith)
But firstname is having spaces after the name............
eg(John Smith)
so while concatenating I want to trim the unwanted spaces after the first name...
For that i tried with replace function in BIRT like (firstname.replace(" ",""))
But it is not working...
Can anyone provide solution for this...
Thanks
Sankari
Find more posts tagged with
Comments
mwilliams
Hi Sankari,
So, you currently have 2 data fields (firstName and lastName) that you want to concatenate to look like "firstNamelastName"? Are you doing this in a computed column or somewhere else? What does your code look like for the concatenation?
Sankari
Hi mwilliams,
Thanks for the reply..u r rite...I want output as (FirstnameLastname)...
But in database after first name there are some spaces.
So while concatenating i got o/p as (Firstname Lastname)...
I used this code
Firstname.replace(" ","")+lastname
I tried this code in computed column only
I donno whether it is correct or not.But it is not working...
mwilliams
Sankari,
Try this:
Firstname.replace(/ /gi, "") + Lastname;