How to Create a Custom Math Formula
Create your own custom math formulas inside of Adalo
Skill Level: Intermediate
Before You Begin
Should have knowledge about Databases
Should have knowledge of Magic Text
Walkthrough
Using Custom Formulas with 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*
orx
for multiplication( )
for parentheses to group parts of the formula
Insert Magic Numbers:
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.
Example: Calculating Trip Cost Per Person
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.
Additional Tips
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.
Help
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!
Last updated