Forum Discussion
DougHenning1
3 years agoCommunity Manager
You could also use PadRight to fill in the missing zero(s):
------------------------------
Doug Henning
------------------------------
var Number total = Round([Total Retail], 0.01);
var Text fraction = PadRight(ToText(($total - Int($total)) * 100), 2, "0");
var Text TotalRetailTextFormat = ToText(Int($total)) & "." & $fraction;
------------------------------
Doug Henning
------------------------------
MarkShnier__You
Qrew Legend
3 years agoYes, Doug's is simpler, but mine should also do the commas, like
$1,234.56
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
$1,234.56
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- DougHenning13 years agoCommunity ManagerGreat point Mark! You can also add number comma formatting by using the ToFormattedText function:
var Number total = Round([Total Retail], 0.01);
var Text fraction = PadRight(ToText(($total - Int($total)) * 100), 2, "0");
var Text TotalRetailTextFormat = ToFormattedText(Int($total), "comma_dot") & "." & $fraction;
------------------------------
Doug Henning
------------------------------- MarkShnier__You3 years ago
Qrew Legend
Thx Doug,
I will add your formula to the Borg Collective knowledge.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------