Forum Discussion
Fantastic! Below at the bottom is what I've got now, and it's working great, other than the align right issue.
(1) Changed THIS: var text Words = "$" & List(",",$Thousands,$Hundreds) & $Decimals;
TO THIS: var text Words = List(",",$Thousands,$Hundreds) & $Decimals;
(This was causing an extra ampersand on every line.)
(2) Changed THIS: var number Value = Round($PriceToUse ,0.01);
TO THIS: var number Value = Round($PriceListToUse ,0.01);
This is what's working:
var number PriceToUse = Case([Price List to Use],
"US List Price", [US List Price],
"Asia Dist Price", [Asia Dist Price],
"Asia List Price", [Asia List Price],
"EUR Dist Price", [EU Dist Price],
"EUR List Price", [EU List Price]);
var number Value = Round($PriceToUse ,0.01);
var text Decimals = "." & Right(ToText(Int($Value * 100)),2);
var text Thousands = If($Value>=1000,ToText(Int($Value/1000)));
var text Hundreds=Right(ToText(Int($Value)),3);
var text Words = List(",",$Thousands,$Hundreds) & $Decimals;
Case([Price List to Use],
"US List Price", "$" & $Words,
"Asia Dist Price", "$" & $Words,
"Asia List Price", "$" & $Words,
"EUR Dist Price", [Euro Symbol] & $Words,
"EUR List Price", [Euro Symbol] & $Words)
Any more tips on getting the numbers to align right? I was playing around with this a little, but no luck.....