5 Replies Latest reply on Jan 10, 2013 4:29 AM by Shawn Wallwork

    Removing CR, LF, Leading and Trailing spaces from a variable

    Buddy DILELLA

      I was wondering if anyone knows how to clean up a variable in a calculate function.


      I am picking up a field from a ticketing system and as usual there is no validation.  So the field sometimes contain leading and trailing spaces, carriage returns, and Line feeds and anything else that you can imagine.  Is there anyway I can get rid of all of these pain in the neck items in one fell swoop using a calculate function. 


      If you notice I am already getting rid of one thing now, to get rid of the rest I mentioned above.


      IIF (ISNULL([Area]), '', Replace([Area],"Area: ", ""))



      Thanks for any light you can shed on this.