How to Create a Custom Math Formula
Create your own custom math formulas inside of Adalo
Last updated
Create your own custom math formulas inside of Adalo
Last updated
Skill Level: Intermediate
Should have knowledge about Databases
Should have knowledge of Magic Text
When adding Magic Text, you’ll notice the option "New Formula..." at the bottom of the menu. Selecting this will insert a "Custom Formula" chip into your text box. Follow these steps to use the formula:
Click on the "Custom Formula" chip to open the formula editor.
In the editor, you can type any number along with the following operators:
+
for addition
-
for subtraction
/
for division
*
or x
for multiplication
( )
for parentheses to group parts of the formula
Insert Magic Numbers:
Click the Magic Number icon to insert a number from your database.
Magic Numbers use Number properties from your data, and you can filter them by Counts, Sums, Averages, etc., of related collections.
Insert Functions:
The Magic Number icon also allows you to insert functions into your formulas. The following functions are supported:
Supported Functions
Round: Rounds a number to the nearest integer.
Integer (INT): Removes the decimals from a number (rounding down).
Absolute Value (ABS): Displays the absolute (positive) value of a number.
Square Root (SQRT): Displays the square root of a number.
Exponent (EXP): Raises one number to the power of another.
Random Number (RAND): Generates a random number between two specified values.
Logarithm (LOG): Displays the base 10 logarithm of a number.
Let’s say you want to calculate the cost of a trip per person using a custom math formula.
Insert a text box.
Select the Magic Text button (red accented letter).
Choose "New Formula" from the popup menu.
Click on the pencil icon to open the formula editor.
Click the Magic Number icon and select Trip Cost.
Enter /
(to divide).
Click the Magic Number icon again and select Group Size.
You can also edit prefixes, suffixes, and formatting for custom formulas as needed.
Now, your formula will divide the total trip cost by the group size.
You can combine multiple Magic Numbers, operators, and functions in the same formula to create more complex calculations.
Custom formulas are flexible—tailor them to your specific needs by adjusting the numbers or properties from your database. Check out some used by our Adalo Makers Here.
If you need additional help with this article, you can always ask in our community forum! Be sure to paste the link to this article in your post as well!