Discussions

Expand all | Collapse all

Remove blank spaces and make lower case

  • 1.  Remove blank spaces and make lower case

    Posted 03-02-2017 14:10
    I would like to create a text formula that removes blank spaces and changes text to lower case. For example: 
    [Field A] = New York City
    [new formula field] = newyorkcity

    thanks


  • 2.  RE: Remove blank spaces and make lower case

    Silver
    Contributor
    Posted 03-02-2017 14:59

    This formula text field removes up to four embedded spaces. You can understand the logic and add more Part() function terms if your strings have more spaces embedded.

    Lower(
    Left([Field to fix]," ")&Part([Field to fix],2," ")&Part([Field to fix],3," ")&Part([Field to fix],4," ")
    )



  • 3.  RE: Remove blank spaces and make lower case

    Posted 03-02-2017 15:01
    Ended up using a solution the Mark suggested awhile back.....

    If I used:  Lower(Part([City], 1," ") & Part([City], 2," ") then New York City would become: newyork (no city)

    So I had to add a few more "Parts"
    Lower(Part([City], 1," ") & Part([City], 2," ") & Part([City], 3," ") & Part([City], 4," "))