Discussions

 View Only
  • 1.  Phone Number Brackets

    Posted 11-24-2022 23:35
    Hi 
    Is there a formula that removes the brackets from a phone number when a csv is exported from Quickbase?  Other than changing the field to numeric

    ------------------------------
    Jessica Matenga
    ------------------------------


  • 2.  RE: Phone Number Brackets

    Posted 11-25-2022 06:16

    Try this. Assumes a North American starting format. 

    var text Tel = ToText([My Phone# field]);

    var text RemoveBracketOne = SearchAndReplace($Tel,"(","");
    var text RemoveBracketTwo = SearchAndReplace($RemoveBracketOne,")","");
    var text RemoveHyphen = SearchAndReplace($RemoveBracketTwo,"-","");


    $RemoveHyphen



    phone# to 10 digits prefixed with +1

    var text Tel = ToText([Mobile for Drug test Notifications]);

    var text RemoveBracketOne = SearchAndReplace($Tel,"(","");
    var text RemoveBracketTwo = SearchAndReplace($RemoveBracketOne,")","");
    var text RemoveHyphen = SearchAndReplace($RemoveBracketTwo,"-","");


    SearchAndReplace($RemoveHyphen," ","")








    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Phone Number Brackets

    Posted 11-27-2022 15:55
    Thanks Mark that worked perfectly with the mobile numbers.  For the phone number is also removed the brackets and hyphen but there is a space after the closing bracket so converted the space appears -
    029 7963100 or 5 5937586

    Just need to remove the space as well if you can supply the additional formula.
    Thanks

    ------------------------------
    Jessica Matenga
    ------------------------------



  • 4.  RE: Phone Number Brackets

    Posted 11-27-2022 17:01
    The formula should have removed the space too. Can you post your whole formula?

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Phone Number Brackets

    Posted 11-27-2022 17:08
    Hi Mark
    Here is the formula for the Phone Number field -

    var text Tel = ToText([Phone Number]);

    var text RemoveBracketOne = SearchAndReplace($Tel,"(","");
    var text RemoveBracketTwo = SearchAndReplace($RemoveBracketOne,")","");
    var text RemoveHyphen = SearchAndReplace($RemoveBracketTwo,"-","");


    $RemoveHyphen

    ------------------------------
    Jessica Matenga
    ------------------------------



  • 6.  RE: Phone Number Brackets

    Posted 11-27-2022 17:11
    The spacing in my original post was odd, but you need the last line as well.


    var text Tel = ToText([Phone Number]);

    var text RemoveBracketOne = SearchAndReplace($Tel,"(","");
    var text RemoveBracketTwo = SearchAndReplace($RemoveBracketOne,")","");
    var text RemoveHyphen = SearchAndReplace($RemoveBracketTwo,"-","");
    SearchAndReplace($RemoveHyphen," ","")

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: Phone Number Brackets

    Posted 11-27-2022 17:16
    PERFECT!!! Thank you Mark, that works.


    ------------------------------
    Jessica Matenga
    ------------------------------