Conditional Formatting > General Information β
Introduction β
Key Concepts β
- A conditional formatting field is necessarily associated with a level. This cannot be updated.
- A conditional formatting field is composed of a set of statuses, each of which is associated with a set of rules on a set of item properties (identifier, classification, field).
- A conditional formatting field can only be associated with property on an item (field, classification or identifier) from the same level.
- It is not possible to associate a given status of a conditional formatting field with a property from another level (a child or a parent).
- Updating the structure of a table will automatically update the values of the conditional formatting fields for every item in the table (in the context of the owner of the table and the context of the partners using this table).
Conditional Formatting Field β
- A conditional formatting field has the following properties:
- A title
- Multiple localized title
- A description
- Multiple localized description
- A set of metadata
- A default status
- A list of statuses
Conditional Formatting Field Creation and Update β
- The creation and update of conditional formatting fields are only done using the table import task; table-import-schema.
- To date, it is not possible to create or update conditional formatting fields using the API or the
app.product-live.comapplication.
Conditional Formatting Field Lifecycle β
- Deleting a conditional formatting field is not allowed.
- A conditional formatting field may be archived (and alternatively unarchived).
- Archiving a specific conditional formatting field is only possible using the table-import-schema task.
- In
INCREMENTALmode- A conditional formatting field may be archived by adding
status=ARCHIVEDattributes to the targeted conditional formatting field. Only thekeyof a conditional formatting field is needed to archive it
- A conditional formatting field may be archived by adding
- In
EXHAUSTIVEmode- A conditional formatting field may be archived by omitting it in the table schema.
- A conditional formatting field may be archived by adding
status=ARCHIVEDattributes to the targeted conditional formatting field. Only thekeyof a conditional formatting field is needed to archive it
- In
- Archiving a specific conditional formatting field is only possible using the table-import-schema task.
An archived conditional formatting field is no longer recalculated/interpreted. It always presents its default value on all the items concerned.
<Conditional-Formattings>
<Conditional-Formatting key="compliance" level="product" status="ARCHIVED" />
</Conditional-Formattings>2
3
Conditional Formatting Field Limitations β
- The number of conditional formatting fields is limited to 8 per table.
- The number of statuses per conditional formatting field is limited to 10.
- See Technical Limits > Conditional Formatting for a more detailed description of the limitations.
Conditional Formatting Status β
- A conditional formatting status has the following properties:
- A title
- Multiple localized title
- A description
- Multiple localized description
- A color (one of the following:
NONE,RED,ORANGE,GREEN,BLUE,BROWN,YELLOW,BLACK,PINK,PURPLE) - A priority (an integer, higher then 1)
- A set of rules
- A status on a conditional formatting field associated with a specific item may be triggered by one or many rules (within the list of rules of the status).
- For example: The status named
Erroris triggered by the rulesRule-Requiredon the field namedTitle
- For example: The status named
- If more than one status is triggered on a given item (and a given conditional formatting field), the status with the highest priority is used.
- For example: If the status
Error(with a priority of2) and the statusWarning(with a priority of1) are triggered on the same item (and the same conditional formatting field), the statusErrorwill be used.
- For example: If the status
- One and only one status may be selected for a given item and a given conditional formatting field)
- If no status is triggered on a given item (and a given conditional formatting field), the default status is used.
Conditional Formatting Status Creation and Update β
- The creation and update of conditional formatting statuses is only done using the table import task; table-import-schema.
- To date, it is not possible to create or update conditional formatting statuses using the API or the
app.product-live.comapplication.
Conditional Formatting Status Lifecycle β
- Deleting a conditional formatting status is not allowed.
- A conditional formatting status may be archived (and alternatively unarchived).
- Archiving a specific conditional formatting status is only possible using the table-import-schema task.
- In
INCREMENTALmode- A conditional formatting status may be archived by adding
status=ARCHIVEDattributes to the targeted conditional formatting status. Only thekeyof a conditional formatting status is needed to archive it
- A conditional formatting status may be archived by adding
- In
EXHAUSTIVEmode- A conditional formatting status may be archived by omitting it in the table schema.
- A conditional formatting status may be archived by adding
status=ARCHIVEDattributes to the targeted conditional formatting status. Only thekeyof a conditional formatting status is needed to archive it
- In
- Archiving a specific conditional formatting status is only possible using the table-import-schema task.
An archived conditional formatting status is no longer recalculated/interpreted. It always presents its default value on all the items concerned.
<Conditional-Formattings>
<Conditional-Formatting key="compliance" level="product">
<Title>Compliance</Title>
<Default-Status key="valid">
<Title>Valid</Title>
<Color>GREEN</Color>
</Default-Status>
<Statuses>
<Status key="unvalid" status="ARCHIVED" />
</Statuses>
</Conditional-Formatting>
</Conditional-Formattings>2
3
4
5
6
7
8
9
10
11
12
WARNING
Setting a Conditional-Formatting.Status status="ARCHIVED" does not archive the Rules within it. They are still executed and visible in the grid.To completly archive a Conditional-Formatting.Status, either omit it in EXHAUSTIVE mode or archive it and each of its Rules
Conditional Formatting Status Limitations β
- The number of status is limited to 10 per conditional formatting field.
- See Technical Limits > Conditional Formatting for a more detailed description of the limitations.
Conditional Formatting Rule β
Conditional Formatting Rule Key Concepts β
- A rule within an archived conditional formatting field or status is no longer interpreted.
- An archived rule within an active conditional formatting field or status is no longer interpreted.
Conditional Formatting Rule Creation and Update β
- The creation and update of conditional formatting statuses is only done using the table import task; table-import-schema.
- To date, it is not possible to create or update conditional formatting statuses using the API or the
app.product-live.comapplication.
Conditional Formatting Rule Lifecycle β
- Deleting a conditional formatting rule is not allowed.
- A conditional formatting rule may be archived (and alternatively unarchived):
- Archiving a specific conditional formatting rule is only possible using the table-import-schema task.
- In
INCREMENTALmode- A conditional formatting rule may be archived by adding
status=ARCHIVEDattributes to the targeted conditional formatting rule. Only thekeyof a conditional formatting rule is needed to archive it
- A conditional formatting rule may be archived by adding
- In
EXHAUSTIVEmode- A conditional formatting rule may be archived by omitting it in the table schema.
- A conditional formatting rule may be archived by adding
status=ARCHIVEDattributes to the targeted conditional formatting rule. Only thekeyof a conditional formatting rule is needed to archive it
- In
- Archiving a specific conditional formatting rule is only possible using the table-import-schema task.
An archived conditional formatting rule is no longer recalculated/interpreted. It always presents its default value on all the items concerned.
<Conditional-Formattings>
<Conditional-Formatting key="compliance" level="product">
<Title>Compliance</Title>
<Default-Status key="valid">
<Title>Valid</Title>
<Color>GREEN</Color>
</Default-Status>
<Statuses>
<Status key="unvalid" />
<Title>Unvalid</Title>
<Color>RED</Color>
<Priority>1</Priority>
<Rules>
<Common>
<Field key="titleEn">
<Rule-Required status="ARCHIVED" />
</Field>
</Common>
</Rules>
</Status>
</Statuses>
</Conditional-Formatting>
</Conditional-Formattings>2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Conditional Formatting Rule Limitations β
- The number of rules is limited to 500 000 per conditional formatting field.
- See Technical Limits > Conditional Formatting for a more detailed description of the limitations.
Conditional Formatting Rule Types β
There are three types of rules:
- Rules specific to a type of field (or to identifiers and classifications), for example: "the title field cannot be empty".
- The "inter-field" rules are also specific to a type of field, and depend on the state of a third-party element to be evaluated, for example: "the field price including tax must be greater than the field price excluding tax".
- The rule "Condition". This is a generic rule allowing to trigger a status on a given field according to conditions defined within it.
Rules specific to a type of field β
Rules on identifiers β
Below, the only rules available for IDENTIFIER
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current identifier is required (and should not be empty) |
MIN_LENGTH | <Rule-Min-Length min="3" /> | If the attribute is not empty, the attribute must be at least x characters long, x included. If the attribute is empty, the rule is ignored. |
MAX_LENGTH | <Rule-Max-Length max="27" /> | If the attribute is not empty, the attribute must have a maximum of x characters, x included. If the attribute is empty, the rule is ignored. |
REGEX | <Rule-Regex regex="^[0-9]{13}$" /> | If the attribute is non-empty, the attribute must match the regex |
BARCODE | <Rule-Barcode type="EAN13" /> | If the attribute is non-empty, then the attribute must match the format specified in the type attribute. The formats are: EAN8, EAN12, EAN13, EAN14, EAN18, GTIN12, GTIN13, GTIN14 |
- Examples for those rules may be found here
Rules on classifications β
Below, the only rules available for CLASSIFICATION
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current classification is required (and should not be empty) |
IS_LEAF | <Rule-Is-Leaf /> | If a category is selected, then it must be a category of type last child in the tree. |
ONLY_ACTIVE_CATEGORIES | <Rule-Only-Active-Categories /> | Categories such as option lists can be archived, this rule indicates that for a category to be valid, this category must be in the ACTIVE status. |
- Examples for those rules may be found here
Rules on SINGLE-LINE-TEXT or LONG-TEXT fields β
Below, the only rules available for SINGLE-LINE-TEXT or LONG-TEXT fields
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current field is required (and should not be empty) |
MIN_LENGTH | <Rule-Min-Length min="3" /> | If the attribute is not empty, the attribute must be at least x characters long, x included. |
MAX_LENGTH | <Rule-Max-Length max="27" /> | If the attribute is not empty, the attribute must have a maximum of x characters, x included. |
REGEX | <Rule-Regex regex="^hello$" /> | If the attribute is non-empty, the attribute must match the regex |
BARCODE | <Rule-Barcode type="EAN13" /> | If the attribute is non-empty, then the attribute must match the format specified in the type attribute. The formats are: EAN8, EAN12, EAN13, EAN14, EAN18, GTIN12, GTIN13, GTIN14 |
- Examples for those rules may be found here
Rules on the HTML-TEXT field β
Below, the only rules available for the HTML-TEXT field
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current field is required (and should not be empty) |
MIN_LENGTH | <Rule-Min-Length min="3" /> | If the attribute is not empty, the attribute must be at least x characters long, x included. |
MAX_LENGTH | <Rule-Max-Length max="27" /> | If the attribute is not empty, the attribute must have a maximum of x characters, x included. |
REGEX | <Rule-Regex regex="^hello$" /> | If the attribute is non-empty, the attribute must match the regex |
- Examples for those rules may be found here
Rules on the NUMBER field β
Below, the only rules available for the NUMBER field
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current field is required (and should not be empty) |
LESS_THAN | <Rule-Less-Than value="3" /> | If the attribute is filled in not empty, the attribute must be strictly less than x |
GREATED_THAN | <Rule-Greater-Than value="27.2" /> | If the attribute is filled in not empty, the attribute must be strictly greater than x |
LESS_THAN_OR_EQUAL | <Rule-Less-Than-Or-Equal value="3" /> | If the attribute is filled in non-empty, the attribute must be less than or equal to x |
GREATER_THAN_OR_EQUAL | <Rule-Greater-Than-Or-Equal value="27" /> | If the attribute is filled in non-empty, the attribute must be greater than or equal to x |
DECIMAL_PLACE | <Rule-Decimal-Places precision="2" /> | The number of decimal places. We must not have more precision digits after the decimal point |
NOT_EQUAL | <Rule-Not-Equal value="27"> | Value must be different from x |
- Examples for those rules may be found here
Rules on the IMAGE field β
Below, the only rules available for the IMAGE field
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current field is required (and should not be empty) |
MIN_WITH_PX | <Rule-Min-Width-Px min="200" /> | If an image is mentioned, the width of the image must be greater than or equal to x |
MAX_WITH_PX | <Rule-Max-Width-Px max="1500" /> | If an image is mentioned, the width of the image must be lower than or equal to x |
MIN_HEIGHT_PX | <Rule-Min-Height-Px min="27" /> | If an image is mentioned, the height of the image must be higher than or equal to x |
MAX_HEIGHT_PX | <Rule-Max-Height-Px max="27" /> | If an image is mentioned, the height of the image must be lower than or equal to x |
MAX_SIZE_KB | <Rule-Max-Size-Kb max="300" /> | If an image is mentioned, the size of the image must be lower than or equal to x kilobytes |
EXTENSION | <Rule-Extension extension="jpg,png" /> | If an image is mentioned, the extension of the image must be one of the extensions specified in the extension attribute. The extensions are separated by a comma. This rule is case-insensitive. |
COLOR_SPACE | <Rule-Color-Space name="RGB" /> | If an image is mentioned, the color space of the image must be the one specified in the name attribute. The color spaces available are RGB and CMYK |
COLOR_PROFILE | <Rule-Color-Profile name="sRGB" /> | If an image is mentioned, the color profile of the image must be the one specified in the name attribute. The color profiles available are SRGB and ADOBE_RGB |
- Examples for those rules may be found here
WARNING
If the rule extension is set to jpg, both jpg and jpeg file extensions are considered as valid.
| Conditional Formatting extension value | Valid file extension |
|---|---|
jpg | jpg, jpeg Not case sensitive, ex : jPEG is valid |
png | png Not case sensitive, ex : PNG is valid |
Rules on the ATTACHMENT field β
Below, the only rules available for the ATTACHMENT field
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current field is required (and should not be empty) |
MAX_SIZE_KB | <Rule-Max-Size-Kb max="300" /> | If a file is mentioned, the size of the image must be lower than or equal to x kilobytes |
EXTENSION | <Rule-Extension extension="jpg,png" /> | If a file is mentioned, the extension of the image must be one of the extensions specified in the extension attribute. The extensions are separated by a comma. This rule is case-sensitive. |
- Examples for those rules may be found here
Rules on the fields DATE or Field DATE-TIME β
Below, the only rules available for the DATE or DATE-TIME field
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current field is required (and should not be empty) |
- Examples for those rules may be found here
Rules on the SINGLE-SELECT field β
Below, the only rules available for the SINGLE-SELECT field
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current field is required (and should not be empty) |
ONLY_ACTIVE_OPTIONS | <Rule-Only-Active-Options /> | Only active options are valid (triggered only if an option is selected, empty option is considered as valid) |
MUST_BE_SELECTABLE | <Rule-Must-Be-Selectable /> | Only "consistent" options are valid. An option is considered to be inconsistent when it is not present in the list of selectable options (when it has been reduced by a SET_SELECTABLE_OPTIONS action within a formula) If the attribute is empty, the rule is ignored. |
- Examples for those rules may be found here
Rules on the fields MULTIPLE-SELECT, MULTIPLE-SELECT-QUANTIFIED, MULTIPLE-SELECT-QUANTIFIED-WITH-COMMENTS, MULTIPLE-SELECT-WITH-COMMENTS β
Below, the only rules available for the fields MULTIPLE-SELECT, MULTIPLE-SELECT-QUANTIFIED, MULTIPLE-SELECT-QUANTIFIED-WITH-COMMENTS, MULTIPLE-SELECT-WITH-COMMENTS
| Rule Unique Key | XML Representation | Description |
|---|---|---|
REQUIRED | <Rule-Required /> | The current field is required (and should not be empty) |
ONLY_ACTIVE_OPTIONS | <Rule-Only-Active-Options /> | Only active options are valid |
MIN_VALUES | <Rule-Min-Values min="2" /> | If the attribute is populated, at least x included values must be selected from the list. |
MAX_VALUES | <Rule-Max-Values max="15" /> | If the attribute is populated, a maximum of x included values should be selected from the list. |
- Examples for those rules may be found here
Inter-field rules β
Below, we call "Source" the field which makes it possible to test that a rule is considered as true or false and "Target" the field on which this rule applies.
The rules allowing to compare NUMBER type fields β
WARNING
Rules below only apply if the provided source and target are non-empty.
| Operation | Rule Unique Key | XML Representation | Example |
|---|---|---|---|
| Target > Source | MUST_BE_GREATER_THAN_ANOTHER_FIELD | <Rule-Must-Be-Greater-Than-Another-Field field="priceHT" /> | The price including tax (target) must be strictly higher than the price excluding tax (source) |
| Target >= Source | MUST_BE_GREATER_THAN_OR_EQUAL_ANOTHER_FIELD | <Rule-Must-Be-Greater-Than-Or-Equal-Another-Field field="priceHT" /> | The price including tax (target) must be higher than or equal to the price excluding tax (source) |
| Target < Source | MUST_BE_LESS_THAN_ANOTHER_FIELD | <Rule-Must-Be-Less-Than-Another-Field field="priceTTC" /> | The price excluding tax (target) must be strictly lower than the price including tax (source) |
| Target <= Source | MUST_BE_LESS_THAN_OR_EQUAL_ANOTHER_FIELD | <Rule-Must-Be-Less-Than-Or-Equal-Another-Field field="priceTTC" /> | The price excluding tax (target) must be lower than or equal to the price including tax (source) |
| Target = Source | MUST_BE_EQUAL | <Rule-Must-Be-Equal field="price" /> | |
| Target != Source | MUST_NOT_BE_EQUAL | <Rule-Must-Not-Be-Equal field="price" /> |
The rules allowing to compare DATE or DATE-TIME type fields β
WARNING
Rules below only apply if the provided source and target are non-empty.
| Operation | Rule Unique Key | XML Representation | Example |
|---|---|---|---|
| Target > Source | MUST_BE_GREATER_THAN_ANOTHER_FIELD | <Rule-Must-Be-Greater-Than-Another-Field field="start" /> | |
| Target >= Source | MUST_BE_GREATER_THAN_OR_EQUAL_ANOTHER_FIELD | <Rule-Must-Be-Greater-Than-Or-Equal-Another-Field field="start" /> | |
| Target < Source | MUST_BE_LESS_THAN_ANOTHER_FIELD | <Rule-Must-Be-Less-Than-Another-Field field="end" /> | |
| Target <= Source | MUST_BE_LESS_THAN_OR_EQUAL_ANOTHER_FIELD | <Rule-Must-Be-Less-Than-Or-Equal-Another-Field field="end" /> |
The rule allowing to declare a mandatory target if a source is not empty β
WARNING
The rule below only apply if the provided source and target are non-empty.
| Rule Unique Key | XML Representation | Example |
|---|---|---|
REQUIRED_IF_ANOTHER_FIELD_IS_NOT_EMPTY | <Rule-Required-If-Another-Field-Is-Not-Empty field="southernDepot" /> | βQty to order 1 β southβ (target) is mandatory if the attribute βSouth depotβ (source) is filled in |
The rule allowing to make a target mandatory if a certain option is selected in a option list type field β
This can be applied to below field types :
SINGLE-SLECTMULTIPLE-SELECTMULTIPLE-SELECT-QUANTIFIEDMULTIPLE-SELECT-QUANTIFIED-WITH-COMMENTS
WARNING
The rule below only apply if the provided source and target are non-empty.
| Rule Unique Key | XML Representation | Example |
|---|---|---|
REQUIRED_IF_ANOTHER_FIELD_HAS_OPTIONS | <Rule-Required-If-Another-Field-Has-Options field="batteryIncluded"><Option key="batteryIncluded" /></Rule> | "Number of batteries provided" (target) mandatory when the value "Battery included" is entered in "Battery/battery included" (source). |
The rules to make a target mandatory if a source has a value greater or lower than a given value β
WARNING
Rules below only apply if the provided source and target are non-empty.
| Operation | Rule Unique Key | XML Representation | Example |
|---|---|---|---|
| Mandatory target if source is > value | REQUIRED_IF_ANOTHER_FIELD_IS_GREATER_THAN | <Rule-Required-If-Another-Field-Is-Greater-Than field="quantity" value="0" /> | The field (DARTY - Delivery date 1 β north) is mandatory if the value of the attribute "DARTY - Qty to order 1 - north" is greater than 0 |
| Mandatory target if source is >= value | REQUIRED_IF_ANOTHER_FIELD_IS_GREATER_THAN_OR_EQUAL | <Rule-Required-If-Another-Field-Is-Greater-Than-Or-Equal field="quantity" value="0" /> | The field must not be empty (because {sourceTitle} is greater than or equal to {value}) |
| Mandatory target if source is < value | REQUIRED_IF_ANOTHER_FIELD_IS_LESS_THAN | <Rule-Required-If-Another-Field-Is-Less-Than field="quantity" value="0" /> | The field must not be empty (because {sourceTitle} is less than {value}) |
| Mandatory target if source is <= value | REQUIRED_IF_ANOTHER_FIELD_IS_LESS_THAN _OR_EQUAL | <Rule-Required-If-Another-Field-Is-Less-Than-Or-Equal field="quantity" value="0" /> | The field must not be empty (because {sourceTitle} is less than or equal to {value}) |
| Mandatory target if source is = value | REQUIRED_IF_ANOTHER_FIELD_IS_EQUAL_TO | <Rule-Required-If-Another-Field-Is-Equal-To field="quantity" value="0" /> | The field must not be empty (because {sourceTitle} equals {value}) |
The Rule Condition β
The
Rule Conditionis a more generic rule, allowing to define the condition that triggers it, as well as the message to display to the user. The condition used can use the following information associated with the current item:- The values of its identifiers
- The values of its classifications
- The values of its fields
The
Rule Conditionuses the same condition tools as the formula feature. See the Condition documentation for more information.The
Rule Conditionpossesses the following caracteristics:- A unique key (provided by the user)
- In case multiple
Rule Conditionwith a sameConditional-Formatting/Status/Fieldshare the same key, each definition of theRule Conditionwill overwrite the previous definition. - A set of conditions
- A title
- Multiple localized title
Examples for this rule may be found here
Deleting a
Rule Conditionis not allowed.A
Rule Conditionmay be archived (and alternatively unarchived):- Archiving a
Rule Conditionis only possible using the table-import-schema task.- In
INCREMENTALmode- A
Rule Conditionmay be archived by addingstatus=ARCHIVEDattributes to the targetedRule Condition. Only thekeyof aRule Conditionis needed to archive it
- A
- In
EXHAUSTIVEmode- A
Rule Conditionmay be archived by omitting it in the table schema. - A
Rule Conditionmay be archived by addingstatus=ARCHIVEDattributes to the targetedRule Condition. Only thekeyof aRule Conditionis needed to archive it
- A
- In
- Archiving a
An archived Rule Condition is no longer recalculated/interpreted. It always presents its default value on all the items concerned.
<Conditional-Formattings>
<Conditional-Formatting key="compliance" level="product">
<Title>Compliance</Title>
<Default-Status key="valid">
<Title>Valid</Title>
<Color>GREEN</Color>
</Default-Status>
<Statuses>
<Status key="unvalid" />
<Title>Unvalid</Title>
<Color>RED</Color>
<Priority>1</Priority>
<Rules>
<Common>
<Field key="titleEn">
<Rule-Condition key="TITLE_IS_MANDATORY" status="ARCHIVED">
</Field>
</Common>
</Rules>
</Status>
</Statuses>
</Conditional-Formatting>
</Conditional-Formattings>2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23