Constraint

From PHENOM Portal Knowledgebase
Revision as of 15:49, 15 September 2022 by Nathalie (talk | contribs) (Created page with "Constrains limit the possible values of a view attribute to which they are applied. The nature of the constraint is based on the primitive type employed by the view attribute. == Creating a Constraint == A new Constraint can be created by selecting the corresponding option in the 'Create>Logical' dropdown. Please note that, at this time, the editing of existing constraints is NOT supported in PHENOM - once created a constraint may only be viewed by selecting it in the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Constrains limit the possible values of a view attribute to which they are applied. The nature of the constraint is based on the primitive type employed by the view attribute.

Creating a Constraint

A new Constraint can be created by selecting the corresponding option in the 'Create>Logical' dropdown. Please note that, at this time, the editing of existing constraints is NOT supported in PHENOM - once created a constraint may only be viewed by selecting it in the NavTree.

A constraint can be one of three types: Regular Expression, Real Range, or Integer Range.

Much like the name suggests, a Regular Expression Constraint requires an expression which will limit the possible string values of a view field.

A Real Range Constraint has a lower and an upper bound, and can also specify the exclusivity of each.

An Integer Range Constraint limits the input between a lower and an upper bound, both of which are exclusive.

Applying Constraints to View Attributes

When creating or editing a view attribute you may associate a constraint with it. The primitive must be selected before a constraint can be applied - the primitive options will be filtered based on the primitive that has been selected.



String and Char primitives can have regular expression constraints applied to them. Float and Double primitives can have a real range constraint applied to them. All other primitives are limited to integer range constraints. Enumerations cannot have a constraint applied to them at this time. Applying constraints to view attributes employing multi-axis measurements is also not supported at this time.

A new constraint can also be created while on the view attribute page by clicking the 'Create New Constraint' link at the right side of the constraint selection section.



While in this menu, the constraint creation dialog will be limited to the constraint type that is applicable to the already selected primitive.


Edit