Use Rollups In Formulas
↙️

Use Rollups In Formulas

Master Tag
Tips & Tricks
Created
Dec 31, 2020 05:35 PM
Usage
toNumber
Add
Multiply
Web Tags
Relation
Formula
Alternatives
Cover
Inventory
Name
Price
$45.00
$60.00
$25.00
$20.00
toNumber(prop("Price 1")) + toNumber(prop("Price 2"))
 
Test Rollups in Formula with toNumber
Name
Item 1
Price 1
Item 2
Price 2
Sum
Now let's discuss a workaround for rollup values within a complete database with multiple variables. The final database properties are as follows:
  • Quantity - Number
  • Item - Relation
  • Price - Rollup
  • Sent - Checkbox
 
Here is what the sum formula will determine:
If Sent 1 and Sent 2 checkbox true, then multiple Quantity 1 by Price 1 → add sum to Quantity 2 multiplied by Price 2
 
((prop("Sent 1") and prop("Sent 2")) == true) ? (prop("Quantity 1") * toNumber(prop("Price 1")) + prop("Quantity 2") * toNumber(prop("Price 2"))) : 0
 
Test Checkbox Rollups in Formula
Name
Quantity 1
Item 1
Price 1
Sent 1
Quantity 2
Item 2
Price 2
Sent 2
Sum
4
Sent 1
2
Sent 2
8
Sent 1
Sent 2
13
Sent 1
Sent 2