Page 1 of 1

trim

PostPosted: Fri Jan 11, 2013 10:45 pm
by WStansbury
I want to trim Received returned correspondence indicating an insufficient address for provider from every row. see attached.

Re: trim

PostPosted: Fri Jan 11, 2013 11:22 pm
by Bob Cergol
Wayne,

If I counted correctly you'd make an extra column with the formula:

Substring(Action,80,1000)

The 1000 is just because I don't know the maximum size of your text.

Bob

Re: trim

PostPosted: Fri Jan 11, 2013 11:43 pm
by WStansbury
I am sorry but maybe I did not make myself clear but the last column comes from one field and I just want to remove (trim) that statement from every row in that column. I tried to go to List Options and use one of the trim commands but with no luck. Also, sorry for my ignorance, but Substring(Action,80,1000) means nothing to me. For instance, in Excel I would use the following formula:
=Right(A1,n) where n is the nunber of characters I want to capture.

Re: trim

PostPosted: Sat Jan 12, 2013 1:53 am
by Bob Cergol
Did you try making a plus column using the formula provided? It does what you want. Obviously you'd then use it in place of the native column you're using now -- unless you wanted both columns. Substring(data_column,start_character,total_characters) is equivalent to Right(data_column,total_characters) -- it starts from the left at start_character and outputs total_characters. "Right" outputs total characters starting from the right.

I don't know of any trim command on the list options tab page. There is a "Mid" option that lets you specify: "starting character, total characters" that would accomplish the same thing as the Substring function used in a plus column formula, and in fact, uses "Substring" when the backend is MS-SQL.

Re: trim

PostPosted: Sat Jan 12, 2013 5:38 am
by WStansbury
Thank you so much for your help Bob.

Re: trim

PostPosted: Wed Jan 16, 2013 3:03 pm
by Bob Cergol
I have to set the record straight. I said I didn't know of any "trim" commands on the list options tab page.
It's been so long since I used them I forgot about them. There is a drop-down of formatting options that presents different options based on the data type of the column. On text columns trim and others are available.
Detail_column_format_options.png
Detail_column_format_options.png (19.64 KiB) Viewed 36287 times


Bob

Re: trim

PostPosted: Wed Jan 16, 2013 5:13 pm
by Carsten Sørensen
The "mid" command on list options can also be used as a Right (type R) or as a Left

The option is explained in the title when hovering the mouse over the Mid input fields

Best regards
Carsten