PlanDocket

Formulas

Professional+

Create automatic calculations for pricing, invoice items, and custom fields.

Available in

Resource Starter Professional Business Enterprise
Formulas 0 10 25 Unlimited

The formula system enables complex automatic calculations based on participant data, booth sizes, booked services, and custom fields. Formulas are used for invoice generation, price calculation, and dynamic field values.

Create Formula

Navigate to Settings → Formulas and click "New Formula":

  • Name - Internal name for identification (e.g., "Calculate Booth Rent")
  • Description - Explanation of what the formula calculates
  • Formula Expression - The mathematical calculation with variables
  • Result Type - Currency (€), Number, or Percentage
  • Usage - Where the formula applies (Participant, Application, Invoice)

Basic Syntax

Formulas use a simple mathematical syntax:

  • Basic Operations - + (addition), - (subtraction), * (multiplication), / (division)
  • Parentheses - ( ) for grouping and priority
  • Variables - {variablename} for dynamic values
  • Numbers - Decimal numbers with period: 19.5, 100.00
  • Percentage - Percentages as decimal: 19% = 0.19

Available Variables

These variables are available in formulas:

  • {booth_size} - Booth area in square meters
  • {booth_width} - Booth width in meters (front)
  • {booth_depth} - Booth depth in meters
  • {category_price} - Base price of participant category
  • {days} - Number of event days
  • {quantity} - Ordered quantity for services

Custom Field Values

Use values from custom fields:

  • {field:fieldname} - Value of a custom field (e.g., {field:employee_count})
  • {field:checkbox} - Checkbox value: 1 if checked, 0 if not
  • {field:select} - Selected value of a dropdown field
  • {field:number} - Numeric value of a number field

Conditional Logic

Formulas support if-then conditions:

  • IF(condition, then, else) - Conditional calculation (e.g., IF({booth_size} > 20, 150, 100))
  • Comparison Operators - > (greater), < (less), >= (greater or equal), <= (less or equal), == (equal), != (not equal)
  • Logical Operators - AND (and), OR (or) for combined conditions

Mathematical Functions

  • ROUND(value, digits) - Round to decimal places (e.g., ROUND({booth_size} * 85, 2))
  • FLOOR(value) - Round down to integer
  • CEIL(value) - Round up to integer
  • MIN(a, b) - Smaller of the two values
  • MAX(a, b) - Larger of the two values
  • ABS(value) - Absolute value (positive)

Practical Examples

Typical formulas for event management:

  • Booth Rent by Area - {booth_size} * 85 - Calculates €85 per m²
  • Minimum Amount - MAX({booth_size} * 85, 500) - At least €500
  • Tiered Price - IF({booth_size} <= 10, {booth_size} * 100, IF({booth_size} <= 20, {booth_size} * 90, {booth_size} * 80))
  • Early Bird Discount - {category_price} * IF({field:early_bird} == 1, 0.9, 1) - 10% discount for early booking
  • Multi-Day Discount - {category_price} * {days} * IF({days} >= 3, 0.85, 1) - 15% off for 3+ days

Formula as Invoice Item

Formulas can automatically generate invoice line items:

  • Create Position - Enable "Use as Invoice Item"
  • Position Text - Description text with placeholders (e.g., "Booth Rent {booth_size} m²")
  • Tax Rate - Which VAT rate applies
  • Sort Order - Order on the invoice

Testing Formulas

Test formulas before deployment:

  • Test Mode - Click "Test Formula" in the editor
  • Enter Test Values - Provide sample values for all variables
  • Check Result - The calculated result is displayed immediately
  • Test Edge Cases - Test with extreme values (0, very large numbers)

AI Formula Assistant

Create formulas with AI support (requires AI feature flag):

  • Enter Description - Describe in natural language what the formula should calculate (e.g., "Booth rent based on area with tiered pricing")
  • AI Generates Formula - AI creates the mathematical formula expression based on your description
  • Review Formula - Check the generated formula and adjust if needed
  • Variable Suggestions - AI suggests matching variables from your custom fields

Tips

  • Start with simple formulas and expand them gradually
  • Use the AI formula assistant for complex calculations as a starting point
  • Use test mode with various values before activating the formula
  • Document complex formulas in the description for later reference
  • Avoid division by zero - use IF({variable} != 0, ..., 0)
  • For currency calculations, always use ROUND(..., 2) for 2 decimal places

Notes

  • Formulas are recalculated with each invoice generation
  • Changes to formulas do not affect already created invoices
  • Variables that do not exist are treated as 0
  • Formulas can contain up to 10 nested IF conditions
Esc to close