Oh, I see what you mean now.
I don't think you can do this within Pendragon, but you can in MS Access. So
the easiest thing to do would be to fix this issue in the post-processing. In
Access, there are LTrim, RTrim, and Trim functions that remove leading and/or
trailing spaces.
Also, you can build an expression in a query using "InStr" to find the location
of any particular string (letter, space, etc.) within a string. You can use
this in combination with Left, Right, or Mid, to trim a string to a particular
punctuation mark or the like.
Dave
________________________________
From: Dawn Anastasi <danastasi@...>
To: pendragon-forms@yahoogroups.com
Sent: Tuesday, November 25, 2008 8:33:19 PM
Subject: [pendragon-forms] Re: Trim function
I tried that, but unfortunately the value may have varying amount of
spaces at the end. It's padded to 15 characters. So for example a
value of 12345 would have 10 spaces but 1234567890 would have 5
spaces. I just want to trim all ending spaces.
Is there a way to loop through the characters starting at the end and
stop when it encounters a valid value?
Dawn
--- In pendragon-forms@ yahoogroups. com, Dave Hockman-Wert
<dhwert@...> wrote:
>
> You should be able to use the "Left" or "Right" functions to
extract the leftmost "x" characters or the rightmost "x" characters
from any particular value. Or the "Mid" function to extract a
section in the middle. Check the Scripting Reference for more
details as needed.
>
> Dave
>
>
>
>
>
> ----- Original Message ----
> From: Dawn Anastasi <danastasi@. ..>
> To: pendragon-forms@ yahoogroups. com
> Sent: Wednesday, October 1, 2008 2:54:31 PM
> Subject: [pendragon-forms] Trim function
>
>
> Is there a "trim" function for stripping out leading and/or
trailing
> spaces from a field in a calculate event?
>
> Dawn
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
[Non-text portions of this message have been removed]