Skip to main content

How do I centralize recurring values in formulas?

As a configurator grows, the same numbers appear in many Berechnungen: the pipe diameter, the cutting dimension, a markup factor. If you write these numbers directly into the formulas, the same number appears in ten places— and the next time you make a change, you’ll have to find nine of them.

A better approach: Define the value once as a parameter and use only its name in the formulas.

When to use a parameter, when to use a value property?

If the number depends on the customer’s selection—each pipe has its own diameter—then it belongs among the values as Wert-Eigenschaft. If, on the other hand, the number applies to the entire configurator, it is a parameter.

Creating a Step for Parameters​

Parameters are normal attributes—just ones that the customer never sees. Group them in a separate step so they stay together and don’t interfere with your configuration steps.

  • Open your configurator’s editor.
  • Click on
    Loading...
    and name the new step, for example, “Parameters.”
tip

The step disappears from the configurator as soon as all of its attributes are hidden. So you don’t need a rule to hide it—it won’t even appear to the customer in the first place.

Create a parameter​

  • In the “Parameters” step, click
    Loading...
    .
  • Give the attribute a descriptive name, e.g., “Pipe Diameter.”
  • Select
    Loading...
    as the display option.
  • Click on
    Loading...
    and enter the optional default value—this is the value your formulas will use. Also enter the unit here so it’s clear later whether the value is in millimeters or centimeters.
  • Switch to the
    Loading...
    tab and, in the Display section, check the Hidden box. Your customers should not be able to see the parameter, let alone change it.
  • Click on
    Loading...
    .

The parameter is now available in every calculation, just like a field that the customer fills out:

// Umfang aus dem Parameter Rohrdurchmesser
Rohrdurchmesser * 3.14159;

Changing Parameters​

You can change the value of a parameter in exactly one place: in the Optional Default Value of the field. All formulas that use it will immediately calculate using the new number.

warning

A hidden parameter behaves like a field that the customer has never touched— it still has a value, and this value is effective in formulas and rules. Therefore, never leave the default value blank.

Short Names in Formulas: The Key​

"Pipe Diameter" can quickly make a formula confusing. You can therefore assign a short key to the characteristic, such as "pipeDM". The formula editor will then display the key instead of the name:

rohrDM * 3.14159;
  • Click the pencil icon next to the characteristic.
  • Switch to the
    Loading...
    tab, General section.
  • Enter your short name under Key.
info

The Key field is only displayed when Developer Mode is enabled. You can enable it in your Profil—for the current session only. Of course, once assigned, the key remains valid even if you turn off Developer Mode again.

Also for Other Feature Types​

Not every parameter is a number. Follow the same pattern to create:

  • a Yes/No attribute as a toggle that lets you enable and disable a variant of your configurator—useful for preparing something that will go live later,
  • a text attribute for text that appears in multiple places,
  • a calculated numeric attribute for an intermediate result that appears in multiple formulas. You calculate it once and then only use its name afterward.