BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Follow BOB on Twitter! 
Follow BOB on Twitter! (Opens a new window)  

General Notice: Upcoming Events: BI + Analytics conference: Aug 9.

Removing the last 10 characters from a string.
1 members found this topic helpful
Goto page Previous  1, 2
 
Search this topic... | Search Web Intelligence... | Search Box
Register or Login to Post    Forum Index -> Building Reports -> Web Intelligence  Previous TopicPrint TopicNext Topic
Author Message
winterofbob
Forum Member
Forum Member



Joined: 20 Aug 2012

Posts: 13



PostPosted: Wed Jun 05, 2013 3:41 pm 
Post subject: Re: Removing the last 10 characters from a string.

I've been playing around with several permutations of the solutions offered above, but haven't quite gotten them to work - my problem is similar...

I've got the same problem of no universe access, and need to trim a variable number of characters from the front of a string up to a character "!" and leave the remaining characters.

Exact example:

CKI=ICD9!250.02

I need either everything before "!' removed, or everything after "!" returned. The numeric code length (in this case 250.02) may vary in length.

Any suggestions?

Edit:

Forgot to add the one attempt I thought was close -

=Right([Object];Pos([Object];"!"))

this gives me D9!250.02 in the example above instead of 250.02
Back to top
Mark P
Forum Devotee
Forum Devotee



Joined: 03 Feb 2003
ASUG Icon
Posts: 10777
Location: Manchester, UK


flag
PostPosted: Thu Jun 06, 2013 4:24 am 
Post subject: Re: Removing the last 10 characters from a string.

That wouldn't logicially work - you're taking a number of characters from the right based on the number of characters from the left.

Code:
=Substr([TestString];1+Pos([TestString];"!");Length([TestString])-(1+Pos([TestString];"!")))

_________________
Current version I'm using: 4.1 SP3 over Oracle
Next available for contract or consultancy work: April 4th 2017
______________________________________
Prior versions used: BO3,4,5,6.5,XIr2,XI3 - yes, I have been using BO since 1996!
Back to top
Lone Ranger
Senior Member
Senior Member



Joined: 10 Jul 2003

Posts: 99



PostPosted: Thu Jun 06, 2013 8:33 am 
Post subject: Re: Removing the last 10 characters from a string.

Hi

Try the following formula:

=Right([Object];(Length([Object])-Pos([Object];!)))

More detail can be found here:

http://bobjblog.wordpress.com/2013/06/06/how-to-remove-a-specified-number-of-characters-from-a-string/
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Building Reports -> Web Intelligence  Previous TopicPrint TopicNext Topic
Page 2 of 2 All times are GMT - 5 Hours
Goto page Previous  1, 2
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0113 seconds using 18 queries. (SQL 0.0030 Parse 0.0002 Other 0.0081)
CCBot/2.0 (http://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo