Skip to content
v2.7 (latest)

Table Constant ​

A Table constant lets you create a table with rows and columns:

Keyvalue
percentage_110
percentage_215
percentage_320

Below is a short introduction to Constant tables. In the next chapter, you will find a more elaborate explanation with more examples.

Procedure ​

  1. Create a ruleset named ProductPrices.

Create manually ​

  1. Create a constant named PercentagesTable and set the Constant type to Table.
    ↳ Rulecube shows the Constant Table Designer section.

  2. Click Row twice to add extra rows to the table.

  3. In the Constant Table Designer section, enter these keys and corresponding values:

    Keyvalue
    p110
    p215
    p320
  4. Click Save.

Create by drag and drop ​

If you have a CSV file that contains your table data, you only need to create the constant and set its Type to Table. And then drop the CSV file onto the Value field.

Use ​

Refer to an element from a table constant by addressing the table and key whose value you want:

json
PrecentagesTable.p3