Skip to main content
Skip table of contents

Rules+ | Validity periods

With the Rules+ module, it is possible to query validity periods.

Example

A CS table contains prices with the following columns:

  • Price

  • Valid from

  • Valid until

The currently valid price is to be read from the table.

Procedure
  1. Create a rule for the table rows.

    1. Criterion 1:

      • Field: Valid from

      • Field format: Formatted

      • Operation plug-in: Smaller than

      • Comparison value: +1 day

    2. Criterion 2:

      • Field: Valid until

      • Field format: Formatted

      • Operation plug-in: Greater than

      • Comparison value: -1 day

  2. Create a rule for the table:

    1. Operation plug-in: Check Tablerows

    2. Choose Sub Rule to compare with the Tablerows: Rule for table rows

  3. Create an attribute of the type “Formula” in the PIM Studio and use the formula RULETABLEVAL:

PHP
{=RULETABLEVAL(“Attribute”; “Column”; “Rule ID or key”;Formatted)}

Select the rule for the table rows as the rule ID or key!

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.