Configure Relations
You can use a relation notation as a convenient shorthand to represent multiple contexts.
A relation decision is a list of similar contexts in a pivoted or transposed layout. In other words, each column name is the common key attribute for all cell entries under it, which essentially are the value attributes. For details about contexts and key-value pairs, see Configure Contexts. In a relation decision, each cell entry is an independent logical notation.
In the output of a relation decision, outputs of all contexts within it are clearly distinguished. You can also invoke the output of a particular context or context entry from another decision.
To add a relation decision to the canvas and define its properties, see Add Decisions.
Follow these steps to configure the decision's logic:
The following image shows a relation decision that contains the inventory information for a phone brand:
Similar to list notations, use either Phone Inventory[1] or Phone Inventory[-3] to access the entire context related to black-colored phones. To access all cell entries of a particular column, use the relation name in combination with the column name, for example, Phone Inventory.Price returns all entries of the Price column. To access a particular context entry (for example, “700”), use Phone Inventory.Price[3], Phone Inventory.Price[-1], or Phone Inventory[Color="Rose Gold"].Price.
The following image shows the result of the entire relation decision, which has each context listed separately: