Turbointegrator string parameter - trim enter

Post Reply
Motyl
Posts: 51
Joined: Wed Oct 09, 2013 2:29 pm
OLAP Product: Cognos
Version: 10.1
Excel Version: 2010

Turbointegrator string parameter - trim enter

Post by Motyl »

Hi

I have turbointegrator process, and it is lunched from web sheet. Parameters to process gets from cells, how to avoid putting enter sing from user (trim?)?
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Turbointegrator string parameter - trim enter

Post by Alan Kirk »

Motyl wrote:Hi

I have turbointegrator process, and it is lunched from web sheet. Parameters to process gets from cells, how to avoid putting enter sing from user (trim?)?
It's not clear what you're asking here.

"Trim" usually refers to removing leading and trailing spaces from a string (and there is a rules function that you can use in TI to do that), but "avoid putting enter sing from user" is something that I can't reconcile with that.

Could you please clarify your question.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
iansdigby
Community Contributor
Posts: 109
Joined: Thu Feb 26, 2009 8:44 am
OLAP Product: TM1
Version: 9 + 10 + Plan An
Excel Version: All
Location: Isle of Wight, UK

Re: Turbointegrator string parameter - trim enter

Post by iansdigby »

I'm guessing the enquirer means how to remove the "Enter String" or carriage return character - ASCII code 13, from a passed parameter.

In theory, a string that contained a carriage return could be cleansed in TI with something like:

DELET( pString, SCAN( CHAR(13), pString), 1);

I haven't tried it though....
"the earth is but one country, and mankind its citizens" - Baha'u'llah
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Turbointegrator string parameter - trim enter

Post by Alan Kirk »

iansdigby wrote:I'm guessing the enquirer means how to remove the "Enter String" or carriage return character - ASCII code 13, from a passed parameter.

In theory, a string that contained a carriage return could be cleansed in TI with something like:

DELET( pString, SCAN( CHAR(13), pString), 1);

I haven't tried it though....
I thought of that, but unlike an end of line in Word you aren't likely to find a carriage return at the end of a cell input. (In any case that's usually a CR/LF combination in Word.) Excel does use LF characters (ASCII 10, as opposed to CR ones) to separate lines in a multi-line text entry, but I'm not sure why something like that would (or should) need to be passed as a process parameter. In any case you need to work at doing that in Excel; you only get the LF character if you press [Alt]+[Enter], or if you manually add the character on via an CHAR() function. (Or possibly one other way that's on the tip of my brain but which I can't think of at the moment.) You only get a CR if you do the latter of those.

The question remains a mystery.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Post Reply