Discussions

Expand all | Collapse all

formula help with truncating text

  • 1.  formula help with truncating text

    Posted 05-09-2017 19:34
    I am looking for help with yet another formula that can be used to truncate the text of a text field.   I've tried the right/left and trim, but my results are never consistent. 

    The original field is a synced body field from a table connected to Gmail.  Because these emails come from a third party service, the "from" field or email address does not accurately reflect the client email address which is contained in the email body.

    E.G. - the body field always returns the following: 

    FIRST NAME xxxx Last Name xxx Phone (get help now!) ########## Email xxx@xxxx.com Your Message xxx.

    I need the formula to return only: xxx@xxxx.com

    Any help would be greatly appreciated. 

    Thanks.


  • 2.  RE: formula help with truncating text

    Posted 05-09-2017 20:17
    I tested this and it seem to work.  It does rely on the assumption that the fiel only has one @ in it and users are not tup;ing messages like

    Please order me 5 widgets @ $10 each.

    Here is the formula


    var text AfterAt = Right([gmail text],"@");
    var text AfterAtUpToSpace = Left($AfterAt," ");

    var text BeforeAt = Left([gmail text],"@");
    var text BeforeAtUpToSpace = Right($BeforeAt," ");

    List("@", $BeforeAtUpToSpace, $AfterAtUpToSpace)


  • 3.  RE: formula help with truncating text

    Posted 05-09-2017 21:02
    Thank you so much!!! This works perfectly.  You're amazing.