Numeric Calculation in Fluent Forms
Calculations are available within a field when using a Numeric Field. In this article, we will show you how to set up a calculation in a Numeric field, as well as go over some important rules for using numeric fields in calculations.
- First, we need to create a numeric input field; see this documentation and create some numeric input fields.
- Let’s assume we have two numeric data that need to be calculated and show the resulting data in another field (Result). For this, we need to create 3 numeric fields like the above figure.
- Now hover over the input field (the field where you want to show the result) and click the pencil icon, it will reveal a sidebar on the right side. Now click on Advanced Options.
- Now, from the Advanced Option, click on the Enable Calculation option. It will reveal an input box.
- Now, click on the document icon, and it will show all the available input fields.
- Select them, they will be added to the calculation box.
- Now add the numeric expression in between them (for example add a ‘+’ in between them).
- Don’t put any space in between them, just put the expression.
- Now Save the Form and Preview and you will get the result after putting the values in Number one and Number two.
This Calculations is also applicable in Conversational Forms!
Supported Symbols
Symbol | Explanation |
---|---|
+ | Addition Operator eg. 2+3 results 5 |
– | Subtraction Operator eg. 2-3 results -1 |
/ | Division operator eg 3/2 results in 1.5 |
* | Multiplication Operator eg. 2*3 results 6 |
Mod | Modulus Operator eg. 3 Mod 2 results 1 |
( | Opening Parenthesis |
) | Closing Parenthesis |
Sigma | Summation eg. Sigma(1,100,n) results 5050 |
Pi | Product eg. Pi(1,10,n) results 3628800 |
n | Variable for Summation or Product |
pi | Math constant pi returns 3.14 |
e | Math constant e returns 2.71 |
C | Combination operator eg. 4C2 returns 6 |
P | Permutation operator eg. 4P2 returns 12 |
! | factorial operator eg. 4! returns 24 |
log | logarithmic function with base 10 eg. log 1000 returns 3 |
ln | natural log function with base e eg. ln 2 returns .3010 |
pow | power function with two operator pow(2,3) returns 8 |
^ | power operator eg. 2^3 returns 8 |
root | underroot function root 4 returns 2 |
sin | Sine function |
cos | Cosine function |
tan | Tangent function |
asin | Inverse Sine function |
acos | Inverse Cosine funtion |
atan | Inverse Tangent funtion |
sinh | Hyperbolic Sine function |
cosh | Hyperbolic Cosine function |
tanh | Hyperbolic Tangent function |
asinh | Inverse Hyperbolic Sine function |
acosh | Inverse Hyperbolic Cosine function |
atanh | Inverse Hyperbolic Tangent function |
round | Make a number a decimal/integer. Use case: round(3.235723663, 2) = 3.24 and round(3.235723663, 0) = 3 |
ceil | Use case: ceil(3.235723663) = 4 |
floor | Use case: floor(3.235723663) = 3 |
max | Use case: max(10, 15) = 15 |
min | Use case: min(10, 15) = 10 |