Method Community

 

Is there a way to trim spaces from a field? 

Last post 01-15-2015 5:02 PM by Method_Justin. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-14-2015 9:04 AM

    • DavidGlantz
    • Top 500 Contributor
    • Joined on 01-08-2013
    • San Francisco Bay Area
    • Posts 17

    Is there a way to trim spaces from a field?

    We are parsing fixed length data and want to trim the trailing spaces.  The character action doesn't appear to have an option to do as such.  Maybe there is a tricky way somewhere to do so.

    Thanks.

    David Glantz | Business Cents | david@bcents | www.bcents.biz
  • 01-14-2015 11:05 AM In reply to

    Re: Is there a way to trim spaces from a field?

    Hi David,

    I believe this is possible but it's not particularly straightforward. Where is the value you wish to truncate? I'm assuming it's in a table?

    Let me know.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
  • 01-14-2015 7:57 PM In reply to

    • DavidGlantz
    • Top 500 Contributor
    • Joined on 01-08-2013
    • San Francisco Bay Area
    • Posts 17

    Re: Is there a way to trim spaces from a field?

    Hi 

    Actually, they are text fields on a screen. They are pasting a large block of data in fixed length format and I am parsing the data but need to trim spaces at the end of the block of text.

    Could post to a table if that could help. 

    Thanks. 

    --David

    David Glantz | Business Cents | david@bcents | www.bcents.biz
  • 01-15-2015 1:17 PM In reply to

    Re: Is there a way to trim spaces from a field?

    Answer

    David,

    This is actually very simple to do. All you have to do is use one Enter Value Into Field On Screen action to take the value from your textbox and place it back in the same textbox. Method will automatically truncate any trailing whitespaces for you. :)

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
  • 01-15-2015 4:54 PM In reply to

    • DavidGlantz
    • Top 500 Contributor
    • Joined on 01-08-2013
    • San Francisco Bay Area
    • Posts 17

    Re: Is there a way to trim spaces from a field?

    That is relatively easy.  I must be doing something wrong because i don't see any change.  The after looks exactly the same as the before :-(

    -David

    David Glantz | Business Cents | david@bcents | www.bcents.biz
  • 01-15-2015 5:02 PM In reply to

    Re: Is there a way to trim spaces from a field?

    Hi David,

    Could you try manually typing a string of characters with trailing whitespaces into the Textbox, then running the action I suggested in my previous post? Let me know the result.

    - Justin

    Justin Henderiks
    Technical Sales Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.henderiks@method.me
Page 1 of 1 (6 items)