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)
Computed columns - JAVA syntax
bren1519
Hi,
Struggling with what should be a simple thing here!
If I want to have a computed column that tells me how long another column in the dataset is, I would assume that I would use the "length" function but the syntax appears to be incorrect as I keep getting errors (not a lot of java experience obviously).
There may be a better way of accomplishing what I want to do so I'll also explain that:
I have a column (string) that includes text at the end of the string that I don't want included on the final report.
Example: Corporate Basic Voicemail ( Oct 05/10 to Nov 10/10 )
I want to eliminate the ( Oct 05/10 to Nov 10/10 ) part of the string (26 characters).
My idea was something like:
BirtStr.left(row["Description"],(length(row["Description"])-26))
I'm sure I am making this more convoluted than I have to and I'd appreciate any assistance!
thx
Brenda
Find more posts tagged with
Comments
mwilliams
Hi Brenda,
You should be able to do something like:
row["rowName"].length - 26;
bren1519
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="71216" data-time="1291924026" data-date="09 December 2010 - 12:47 PM"><p>
Hi Brenda,<br />
<br />
You should be able to do something like:<br />
<br />
row["rowName"].length - 26;<br /></p></blockquote>
<br />
<br />
Brilliant! That worked perfectly. Thanks for the help.<br />
<br />
Cheers,<br />
Brenda
mwilliams
Not a problem. Let us know whenever you have questions!