Dynamic Custom Element Editor Dialog

Use this dialog to create Rules for determining whether a Custom setting in the Dynamic PPD Options page of the Printer Wizard should be applied or not.

The Dynamic Custom Element Editor dialog is basically a logical Rule creation dialog.

It can be broken up as follows:

Rule name

Either enter or update the Custom Rule name here. The Dynamic PPD Options page will be updated with the choice thereafter.

Group

A Group consists of one or more sub-Group, Size, Position or Metadata rules with a logic operator.

There may be one rule or many rules at the same level, and there may be Groups nested within Groups This provides the ability to create quite complex nested logical structures.

Four logic choices are available at the Group level. These are:

  • All of the following.
    This equates to the logical operator (... AND ...)
    If all of the following criteria are met, then this group resolves to TRUE.
  • Any of the following.
    This equates to the logical operator (... OR ...)
    If any of the following criteria are met, then this group resolves to TRUE.
  • Not all of the following.
    This equates to the logical operator (NOT(... AND ...)).
    If any (but not all) of the following criteria are met, then this group resolves to TRUE.
  • Not any of the following.
    This equates to the logical operator (NOT (... OR ...))
    If none of the following criteria are met, then this group resolves to TRUE.

The top level is always a Group. A Group can contain one or more sub-Groups.

Rule

A Rule is a logic expression using a single operator or function, and their associated operand(s). The number and type of operands is dependent upon the operator or function chosen.

The Rule types are as follows:

  • Group:
    A single top level Group, plus nested sub-Groups. This nesting of Groups allows for nesting of logical operations.
    For Prolog or Setup entries this is the only option available. In those cases it is to be used so as to set the Rules to always be TRUE, and thus always apply.
  • Position (not available to Prolog or Setup entries):
    This rule operates upon the position of the selected group within the broader group. It operates at Page, Sheet, Document, Document Set and Job Segment levels.
    The logical operators that apply a totally dependent upon what grouping the position is to apply to.
  • Size (not available to Prolog or Setup entries):
    This rule operates upon the size of the selected group. This could be the amount of sub-groups contained within, or the amount of physical sheets. The logical operators that apply a dependent upon the group the size test is being applied to.
  • Metadata (not available to Prolog or Setup entries):
    This rule operates upon Metadata entries. Select the Metadata Field, then select the logical test to apply to it, along with the associated test value(s).
    The Metadata options available are all text based comparisons. They compare whether the Metadata field "is equal to", "is not equal to", "contains" or "does not contain" the selected text value.
    Case sensitivity can be added or removed from the comparison, via the Case sensitive check-box.
    Metadata will only appear as a rule option if Metadata is available. Which means that the metadata option needs to have been selected and set within the Print Wizard.

Expand button

To allow logical constructs than are not currently catered for by the Dynamic Custom Element Editor, the Expand button is available at any time.
The Expand button translates all currently configured rules into JavaScript, which can then be manually edited and expanded.

An example of where this might be useful is in converting a text comparison to a case insensitive comparison. To do so, click the Expand button to convert the rule into JavaScript, then add .toLowerCase() to the relevant sections, making them case insensitive.

The Expansion is a one-way translation that cannot be undone. Once expanded, the rule stays expanded.

The only way to go back to the previously configured rule(s), is to Cancel the Rule editor dialog.