Skip to main content

Nested Formulas

You can nest formulas within other formulas.

Uses

  • When the result of a property is dependent on the result of another property
  • When the cost of a part is dependent on one or more variables
  • If the property requires an “IF” function
  • When the results of the “IF” function need to be simple to adjust

PlanSwift Nested Formulas Operation Precedence highest to lowest

Example

In this example, we demonstrate how we can make the cost of a 2x4 change depending on the length of the board.

Step 1:

Create the primary property by clicking on the “Add Property” button:

PlanSwift Nested Formulas 1

Step 2:

Name the primary property and then click “Okay”:

PlanSwift Nested Formulas 2

Step 3:

Add a list of common lengths (optional but recommended):

PlanSwift Nested Formulas 3

Step 4:

Add a property for each selection in the “Length of Material” property’s list:

PlanSwift Nested Formulas 4

Step 5:

Now input the cost of each length of 2x4 on the corresponding properties:

PlanSwift Nested Formulas 5

Step 6:

Locate the “Cost Each” property and input [[Length of Material]] into the formula:

PlanSwift Nested Formulas 6

This will cause the “Cost Each” property to perform a double search function. It will search for the property named “Length of Material” and then search for a property that matches the result of the “Length of Material” property. Meaning, if the result is “8” then it will search for a property named “8” and return the result of this property to the “Cost Each” property.

Step 7:

Test the function by selecting a length from the “Length of Material” property:

PlanSwift Nested Formulas 7

Ensure that the length you choose returns the correct value to the “Cost Each” property.

If the formula does not work, try “Right-Clicking” on the “Cost Each” property and clicking “Recalculate”.

If it still does not work, check your names for extra spaces or misspellings.

click here to view the previous article Advanced IF - THEN - ELSE Statements Multiple Condition Possible Errors with IF-THEN Formulas click here to view the next article

Related Articles

Be the first to reply!