Skip to main content
Question

Scientific Notation

  • May 21, 2019
  • 0 replies
  • 283 views

Forum|alt.badge.img+3
I have many fields that contain data that needs to be displayed in scientific notation.  Is there a way to display numbers this way?
This topic has been closed for replies.

I do not have a formula for this but be aware that Quick Base only has numerical accuracy up to 13 digits, so if you are looking to enter numbers which very high number of digits, there may need to be some planning involved, and it may depend on if you need to use them in numerical calculations.

For example you can have a text string with essentially unlimited number of digits and have a formula to display in Scientific Notation, but they would not be able to be used in arithmetic calculations.

Forum|alt.badge.img+3
  • Author
  • Quickbase Alumni
  • May 21, 2019
My application is recording the number of cells that are counted under the microscope, so commonly we see 1.35e6 or 1.35^6 in our documentation.  Right now, these same fields would be 1350000.

I will take a shot at  formula when i get a chance unless someone beats me to it.

  • Quickbase Alumni
  • May 21, 2019
Try this:
var number base   = ToNumber(Left([input],"^"));  var number zeroes = ToNumber(Right([input],"^"));  $base*(10^$zeroes)

I think that Rebecca wants to input as 1,350,000 and have another formula text field to display the Scientific Notation of 1.35^6 .


Forum|alt.badge.img+3
  • Author
  • Quickbase Alumni
  • May 21, 2019
Yes, we will enter 1350000 into the field and I would like it to show up as 1.35^6 in both the field and on reports.

  • Quickbase Alumni
  • May 21, 2019
Try this:
var number leng = Length(ToText([numeric input]));  var number base = ToNumber(Left(ToText([numeric input]),1) & "." & NotLeft(ToText([numeric input]),1));  Left(ToText($base),".") & "." & Right(ToText($base),".") & "^" & ToText($leng-1)

Forum|alt.badge.img+3
  • Author
  • Quickbase Alumni
  • May 22, 2019
I am really new at Quick Base so please bear with me. 
 In fields where there is already a formula, I am getting an error that says "There are extra characters beyond the end of the formula." 
In fields where there will just be straight data input (I converted it from numeric to formula numeric), I get an error that says "Field [numeric input]) is not identified".

  • Quickbase Alumni
  • May 22, 2019
You would have two fields--a numeric input field, and a text formula field. You'll enter your value (e.g., "1350000") into the numeric input field, and the text formula field will show the formatted result (e.g., "1.35^6").

In the formula I posted, the "[numeric input]" would reflect the name of your input field.

Does that make sense?

Forum|alt.badge.img+1
  • Quickbase Alumni
  • May 23, 2024

In case anyone was interested in updates to a 6 year old post, I just discovered that Quickbase can interpret scientific notation within the ToNumber() function now. Using Dan's solution below as an example:

var number base = ToNumber(Left([input],"^")); var number zeroes = ToNumber(Right([input],"^")); $base*(10^$zeroes)

Simplifies to:

var number conversion = ToNumber([input]); $conversion