Skip to content

Advanced Formula Constraint Car Example

Consider a car manufacturer that offers electric cars with three different engine types, each optimized for different driving distances:

  • Electric Engine: Ideal for daily mileage of less than 50 miles.
  • Turbo Engine: Recommended for daily mileage between 50 and 150 miles.
  • Standard Engine: Best suited for daily mileage over 150 miles.

Additionally, there are four available wheel sizes:

  • 18” Wheels
  • 19” Wheels
  • 20” Wheels
  • 21” Wheels

The user’s daily mileage input will determine which engine type is recommended, and based on the selected engine, the available wheel sizes will change dynamically.

Configurator Structure

The configurator consists of four main groups:

1. Car Model Group

  • Element: Select Car
    • Option 1: Small Sedan
    • Option 2: Large Sedan
    • Option 3: Small SUV
    • Option 4: Large SUV

2. Mileage Group

  • Element: Miles Driven Per Day
    • Option 1: User inputs the number of miles driven daily (e.g., 50 miles/day).

3. Engine Group

  • Element: Select Engine
    • Option 1: Electric
    • Option 2: Turbo
    • Option 3: Standard

4. Wheels Group

  • Element: Select Wheels
    • Option 1: 18” Wheels
    • Option 2: 19” Wheels
    • Option 3: 20” Wheels
    • Option 4: 21” Wheels

All options are displayed as radio buttons, meaning only one option per group can be selected at a time.

Applying Formula Constraints

If a user inputs Miles Driven Per Day as 50 miles or less, the configurator should automatically recommend the Electric Engine and limit the wheel options to 18” Wheels and 19” Wheels.

This constraint can be enforced in the following ways:

  1. Hiding non-relevant options

    • If Electric Engine is selected, only show 18” Wheels and 19” Wheels.
  2. Automatic selection

    • If Miles Driven Per Day is less than 50 miles, automatically select Electric Engine and hide other engine options (Turbo, Standard).
  3. A combination of both

    • Electric Engine is automatically selected, non-relevant wheels are hidden, and only 18” Wheels and 19” Wheels are shown.

These approaches ensure that users make valid selections while simplifying the configuration process.

How to Make This Formula Constraint

This is a guide on how to create 3. A combination of both.

To implement this formula constraint, follow these steps:

  1. Navigate to Form Builder under the Configurator section:

    • Open the Configurator menu and go to the Form Builder section.
  2. Click “Formula Constraints” on your form:

    • Select Formula Constraints for the specific form where you want to apply the constraint.
  3. Click “Add Formula Constraint”:

    • If you have already created formula constraints, an overview of existing constraints will be displayed for this form.
  4. Fill out the fields:

    • Name (Required): Enter a descriptive name for the constraint. In this case, use:
      “If Miles Driven Per Day is less than 50, select Electric Engine.”
    • Description (Optional): Provide additional details. Example:
      “Condition: If Miles Driven Per Day is less than 50 miles, Effect: Automatically select Electric Engine and hide other engine options.”
      This breakdown of condition and effect will be referenced later in this guide.
    • Ordering (Required): Enter a number to determine the execution order of this constraint.
      • Set this to 0 for now.
      • If another constraint needs to override this one in the future, assign it a higher number (e.g., 1).
      • The constraints are executed sequentially, with the highest number processed last.
    • Formula Constraint Categories (Optional): Select a category for this constraint, if applicable. For now, leave this field blank.
  5. Save and Back:

    • Once all necessary information is entered, click Save and Back to create the new formula constraint.
  6. Click “Formula Constraint Builder”:

    • Open the newly created formula constraint and click Formula Constraint Builder.
  7. Add the condition in the “Condition” tab:

    • Click the icon in the Build Condition field.
    • Under All Values, select Miles Driven Per Day.
    • Select less than 50 miles as the condition.
    • This completes the condition setup for the constraint.
  8. Go to the “Effects” tab and click “Add Effect”:

    • In the Build Effect section, you will see a Function and a Target.
    • The default function is set to Hide, which we will use in Step 9.
    • Click the function field and change it from Hide to Set.
    • Click Select Target.
    • Choose Electric Engine.
    • Click Confirm.
    • Set the value type to Boolean → True.
    • Click Save.
    • Now, when selecting Miles Driven Per Day as 50 or less, Electric Engine will be automatically selected.
  9. Click “Add Effect” to add another effect:

    • This creates another Build Effect section.
    • Click Select Target.
    • Choose Wheels Group and select 19” Wheels.
    • Now, when selecting Electric Engine, the system will hide wheel sizes other than 18” Wheels and 19” Wheels.
    • Click Save.

Now, when a user enters Miles Driven Per Day as 50 or less, the Electric Engine is automatically selected, and the available wheel options will be 18” and 19” Wheels only.