JavaScript rules

In this section you can create and configure new JavaScript rules. Furthermore, you can edit and delete existing JavaScript rules.

Call up JavaScript rules

In order to call up an existing JavaScript rule, proceed as follows:

  1. Choose the JavaScript rule from the rules directory. Possibly use the text search to filter the list of JavaScript rules by a search term.
  2. Click on the JavaScript rule to select it. Following this, the settings of the JavaScript rule are shown in the input field of the “Configuration” card.

Specify JavaScript rules

Generate a JavaScript-Rule and make the

In order to generate a new JavaScript rule and to make the basic settings, proceed as follows:

  1. Click on the Add button in the “JavaScript rules” card to generate a fresh JavaScript rule with blank input fields.
  1. Enter an identifier for the JavaScript rule in the “Identifier” field.
  1. From the “Validation” menu, select the validation type for the validation of the JavaScript rule:
    • JSLint
    • JavaScript-Engine
    • Keine Validierung
The validation is carried out when saving the JavaScript rule.
  1. Enter the JavaScript rule in the editor field.
This screenshot shows a JavaScript rule by which it is checked whether texts are maintained for the respective product. Via the appropriate parameters it is specified which text type is checked by the rule.
  1. Via the corresponding menu, specify if the JavaScript rule is a helper function.
  2. Via the corresponding menu, specify if the JavaScript rule requires a helper function.
  3. Possibly click on the SAVE button to cache your input.

Specify parameters

In order to specify parameters, proceed as follows:

  1. Scroll to the “Parameters” card and add the first parameter:
    1. Click on the CREATE button to call up the corresponding dialog box.
    2. Select a parameter type from the menu. Possibly use the text search to filter the list of parameter types by a search term.
    3. Click on the SAVE button. Following this, the dialog box closes. The parameter is now created.
  1. Configure the parameter you just created:
    1. Specify a value for the position of the parameter in the parameter sequence. Double-click in the table cell of the “Order” column and enter an integer value.
    2. Possibly specify a parameter value. Double-click in the table cell of the “Value” column and enter the value.
  2. Create the remaining parameters and configure them as described above.
  3. Possibly click on the SAVE button to cache your input.
This screenshot shows the parameters for the function shown above. Via the value of the second parameter “ArticleText” it is specified which text type is to be checked by the JavaScript rule.

Create descriptions and finalise the configuration

In order to create rule descriptions and to finalise the configuration, proceed as follows:

  1. In the various input fields of the “Description” card, enter multilingual shortdescriptions for the JavaScript rule. You do not have to fill in all the fields.
  2. Click on the SAVE button to save your input and to finalise the configuration of the JavaScript rule.

The JavaScript rule is now configured.

Edit JavaScript rules

In order to edit a JavaScript rule, proceed as follows:

  1. Call up the JavaScript rule as described above.
  2. Make the desired changes.
  3. Click on the SAVE button to save your changes.

Delete JavaScript rules

In order to delete a JavaScript rule, proceed as follows:

  1. Move the mouse cursor over the JavaScript rule. As you do, the Delete button appears.
  2. Click on the Delete button. Following this, the Confirm deletion button appears.
  3. Click on the Confirm deletion button to confirm the deleting of the JavaScript rule.

FAQ

What are JavaScript rules used for?

JavaScript rules are used for workflows, for example to check whether specific text has been maintained for a product.