The toExponential helper converts a numeric value to exponential (scientific) notation. Use it when working with very large or very small numbers that are easier to read or transmit in scientific notation.
Syntax
{{toExponential field fractionDigits}}
field -- The numeric value to format. Required. Accepts a number, numeric string, or field reference. Non-numeric values return NaN.
fractionDigits -- The number of digits to display after the decimal point. Optional. If omitted, JavaScript determines the number of digits automatically based on the value.
Examples
Format a record field in exponential notation
{{toExponential record.orderId 2}}
Input: record.orderId is "12345"
Output: 1.23e+4
Format a literal value with more decimal places
{{toExponential "3.14159265359" 6}}
Output: 3.141593e+0
Six digits are shown after the decimal point.
Return raw output with triple braces
{{{toExponential "12345" 2}}}
Output: 1.23e+4
Use triple braces when downstream systems require the exact numeric string without Celigo's automatic formatting.
Usage notes
- The input must be numeric or parseable as numeric. Non-numeric values return
NaN. - If
fractionDigitsis omitted, the number of decimal digits is determined automatically by JavaScript. - Use triple braces (
{{{ }}}) for raw output and double braces ({{ }}) when Celigo's default formatting is acceptable.