I use a lot of formulas the calculate a price in USD with the money formatter {=price; format=$,}

I like this formatter for money because it will only show the decimal if the result is not a whole number. The one problem with this formatter is that if there is a decimal that is divisible by 10 (1.1) for example it will represent the price as $1.1 rather than presenting it as $1.10. If it's a decimal that is not divisible by 10 (1.22) then it generates $1.22 which looks correct. I feel like a formatter that is dealing with USD should conform to the presentation standards of that currency but I digress. Is there a way to fix this issue in a formula?

Price:{formtext: name=price} <--Enter a number with just 1 decimal after the whole number and see the non ideal formatting below. For example enter 1.1, then try 1.11 and see the difference.

Price:{formtext: name=price;default=10} <--Enter a number with just 1 decimal after the whole number and see the non ideal formatting below. For example enter 1.1, then try 1.11 and see the difference.

Thanks but that always shows the decimals though. I want the formatted number to show no decimals (or decimal point) if the number is whole. Any ideas?

While I have you, I have one more similar problem to solve. I have a formula where I'd like to achieve the same formatting trick where it drops the decimal if it's not needed. Can you point me in the right direction for how to solve? I'm guessing there's a way to put if statements in a formula but I'm having a helluva time figuring it out...Your assistance is very appreciated.

@Joe_P in this case, you'd want to save your calculation as its own variable first, and then use the if statement to evaluate that variable the same way that we did in the previous one, outputting that variable with different formatting depending on the result of the if.

Thanks, that works well. For some reason I didn't think to make a variable. Thanks for noticing that double up on the price value. In the specific use case it was intentional but if it wasn't you'd have saved me.