Skip to main content

Widget Core Function

The equation widget is used for doing engineering calculations. It’s the primary calculation engine in Calcs.com templates.

UI Experience

  • Not interactive for the user
  • Displays the equation used for the calculation
  • Shows the calculated value to the user

Data Organization and Manipulation

Primary widget for:
  • Mathematical calculations and algebraic expressions
  • Conditional statements and checks
  • Iterations and matrix/vector manipulation

Equation Structure

Single Equation

Multiple Conditional Equations

Using @ Shortcuts

Simplify equation building by using ”@” to reference other widgets:
The ”@” symbol searches by label, symbol, and reference ID, automatically inserting the correct references.

Error Handling

ThrowError vs Throw

  • throwError: Displays a specific message to the user
  • throw: Shows generic “Unexpected Error” message

Special “members” Equation Widget

For exporting data to Member Schedule:

Advanced Features

Matrix Operations

Iterations

Unit Conversions

Conditional Logic

Using @default

The @default condition acts as an “else” statement:

Best Practices

  • Use meaningful variable names
  • Add comments in authorNotes for complex calculations
  • Include proper error handling
  • Reference relevant standards in the references field
  • Use @default for catch-all conditions
  • Test edge cases thoroughly

Common Patterns

Safety Factor Application

Min/Max Selection

Rounding

Examples from Current Calculators