Discussions

Expand all | Collapse all

Text field with numbers and or letters

  • 1.  Text field with numbers and or letters

    Posted 10-10-2017 22:42
    I have a text field called P.O.#
    The reason it's a text field is that some P.O.'s we receive have a text prefix i.e. PR92828.
    Some are only numbers i.e. 63636.
    If I enter 63636 as the P.O. number and save it, it appears as 63,636. I do not see any setting for not adding the commas in text field that contains on numbers.


  • 2.  RE: Text field with numbers and or letters

    Top
    Contributor
    Posted 10-11-2017 03:21
    you might be able to set the field properties via the API_SetFieldProperties
    https://help.quickbase.com/api-guide/index.html#setfieldproperties.html%3FTocPath%3DQuick%2520Base%2...

    number formatting is:  "&numberfmt="
    for no cammas: "0"

    URL:
    https://target_domain/db/target_dbid?a=API_SetFieldProperties&fid=7&numberfmt=0&apptoken=app_token

    If the api response says "No error" then you are good to go.  I haven't tested it. But I've forced field properties on fields that normally don't give you the option before.


  • 3.  RE: Text field with numbers and or letters

    Posted 10-11-2017 12:58
    I'm on Essentials so no API.


  • 4.  RE: Text field with numbers and or letters

    Top
    Contributor
    Posted 10-11-2017 16:00
    Another workaround option is to change the field to a numeric field. 
    Then it will give you the settings option to chose the comma usage.  change it. save it. then change the field back to text.

    If you already have data in there with letters. I'd recommend duplicating the field and testing, so you don't lose your data.

    (Again, I've never had to do it this way, but sometimes changing the field type will carry over old attributes)


  • 5.  RE: Text field with numbers and or letters

    Posted 10-11-2017 16:05
    I will try it. Thank you. 
    Seems like this should be a standard setting for a text field since I'm sure many people deal with P.O. numbers like AT48094 .


  • 6.  RE: Text field with numbers and or letters

    Top
    Contributor
    Posted 10-11-2017 16:07
    Yeah, this does seem a bit odd.


  • 7.  RE: Text field with numbers and or letters

    Posted 10-11-2017 16:11
    I will write a support ticket. When I get a response I'll copy you.


  • 8.  RE: Text field with numbers and or letters

    Posted 10-11-2017 18:03
    Just as a follow up....
    I created a ticket with QB support. Explained in detail. I know it wasn't my imagination because I found other with the same experience. One that gave me the.....change to numeric then back to text....which worked.
    QB support said it should not be adding commas in a text field.
    So, I added a new TEST text field this morning to the same table where the situation occurred. 
    Lo and behold it behaved correctly. I'm writing it off to an anomaly. But as a programmer and developer for 35 years my instinct was to track down what was causing it. Glad it was resolved.

    Thank you for your help.