Forum Discussion
DanLadner1
Qrew Trainee
There's also a built-in function: https://login.quickbase.com/db/6ewwzuuj?a=dr&rid=188
LienGilhooley
5 years agoQrew Cadet
The ToFormattedText function with the "comma_dot" function works well for me when the value of the number I am converting is 10,000 for greater. However, if my data value if < 10,000, this function leaves out the comma.
For example:
ToFormattedText(10000, "comma_dot") == 10,000
ToFormattedText(9000, "comma_dot") == 9000
Has anyone else experienced this?
------------------------------
Lien Gilhooley
------------------------------
For example:
ToFormattedText(10000, "comma_dot") == 10,000
ToFormattedText(9000, "comma_dot") == 9000
Has anyone else experienced this?
------------------------------
Lien Gilhooley
------------------------------
- BramTyler15 years agoQrew MemberThis post is a bit old now but for those who see this and need help still if you want commas to start appearing appear after 3 digits you can use it like ToFormattedText(9000, "comma_dot", 3) => 9,000.
Here is the description from Quick Base:
ToFormattedText (Number n, Text f, Number c)
Description: Returns a Text value containing the formatted print representation of the number n, using the format f, with separators starting after number c digits. Valid values for c are 3 or 4; if it is 3, separators will be shown starting after 3 digits instead of after 4.
Example:
ToFormattedText(1234.56,"comma_dot", 3) returns "4,567.89"
ToFormattedText(1234.56,"comma_dot", 4) returns "4567.89"
ToFormattedText(1234567.89,"comma_dot_2",3) returns "12,34,567.89"
ToFormattedText(1234.56,"dot_comma", 3) returns "4.567,89"
ToFormattedText(1234.56,"dot_comma", 4) returns "4567,89"
ToFormattedText(1234567.89,"dot_comma_2",3) returns "12.34.567,89"
------------------------------
Bram Tyler
------------------------------- ChristopherWhea11 months agoQrew Cadet
Quickbase Support, please update your documentation to include the 3rd parameter mentioned above:
------------------------------
Chris Wheatley
------------------------------- MarkShnier__You11 months agoQrew Legend
Chris, good catch. I have put in a support ticket on this.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------