Is there a way to put any type of text, such as brackets, parentheses, or something around negative numbers for a numeric formula field?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I would like for there to be some way to easily differentiate between positive and negative numbers in a numeric formula field. Currently I have a text formula field that takes the numeric field and turns the value red if it's negative, but text fields don't show totals at the bottom of the report which would actually be very helpful. I was wondering if there was any way to insert brackets or parentheses around the number if it's negative while still keeping the field a numeric formula field. 

Thank you in advance.

Photo of Brandon

Brandon

  • 120 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of QB_Support_Brian

QB_Support_Brian

  • 40 Points
Hi Brandon,

Unfortunately there is not currently a way using native QuickBase to have a Numeric field display negative text in red, or with parentheses around it.I'm sorry for the inconvenience. If you could suggest this as a new feature on our User Voice site I would appreciate it. You can do so by going to My Apps and clicking the orange Feedback tab on the left side.

For reference, here is an example of the kind of formula you're referring to. That way others who may find this page are aware of the workaround. Let's say you have a Numeric - Currency field. If you create a new Formula - Text field with the formula below, you can get negative values to appear in red:



"<div " & If([Currency field]<0,"style='color:red; '") & ">" & If([Currency field]<0,"-$","$") &

If(Length(Left(ToFormattedText(Abs([Currency field]),"comma_dot"),".")) = 4,


Left(ToText(Abs([Currency field])),1) & "," & NotLeft(ToText(Abs([Currency field])),1),


ToFormattedText(Abs([Currency field]),"comma_dot")) & "</div>"




You'll need to make sure "Allow some HTML" is enabled in the field settings.



Thanks,

Brian
Photo of Brandon

Brandon

  • 120 Points 100 badge 2x thumb
Thank you, I was just wondering if it was at all possible.