Text field with numbers and or letters

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
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.
Photo of ed cooper

ed cooper

  • 880 Points 500 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
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.
(Edited)
Photo of ed cooper

ed cooper

  • 880 Points 500 badge 2x thumb
I'm on Essentials so no API.
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
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)
Photo of ed cooper

ed cooper

  • 880 Points 500 badge 2x thumb
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 .
Photo of Matthew Neil

Matthew Neil

  • 31,418 Points 20k badge 2x thumb
Yeah, this does seem a bit odd.
Photo of ed cooper

ed cooper

  • 880 Points 500 badge 2x thumb
I will write a support ticket. When I get a response I'll copy you.
Photo of ed cooper

ed cooper

  • 880 Points 500 badge 2x thumb
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.