Back Forward Constraints form
Completing the Constraints tab

About Constraints rules

 zzz Show all 

Record the computations that constrain the property values. Each row defines a separate constraint. Enter at least one row. Order is not significant.

When the system detects that a constraint fails, it adds a message to the page of the property identified in the left portion of the Require That field (if any). The presence of this message ordinarily prevents the system from saving the page containing this property value to the database.

You can cause a specific additional message (Rule-Message rule type) to become associated with that property or another property when the constraint fails, in the Else row.

Detection of this message and any later processing to correct the constraint — such as displaying a message to a user, recalculation of the property value, and so on — is an application responsibility.

NoteEach property involved in the constraint expression must be on the primary page (the page that has the class corresponding to the Applies To key part) or on an embedded page identified in Page Context field on the Pages & Classes tab.

 zzz Using the controls

Click any constraint to enable controls.

Control

Action

open icon
zzz

Click to review a property rule (for a field that contains a property reference). If the property does not exist, click thezzzbutton to create a new property rule.

expression selector
zzz

Click thezzz button to display a drop-down list of all boolean expressions.

row buttons
zzz,zzz, and zzz

Select any constraint to enable. Click the zzz,zzz, orzzz buttons to add a new constraint before or after the selected constraint, or to delete the selected constraint. (Equivalently, use the  Insert  ,  Shift+Insert  , and  Delete   keys.)

Display Name

Display Label

When reviewing this tab, you can see a presentation using either property names or the Short Description (pyLabel) of properties. Click to toggle the display. (Note that two or more properties may have the same Short Description text.)

 zzz Modifying constraints with drag and drop operations

To move a constraint to a different location, click and drag the small circle located to the left of the entry.

To copy a constraint, drag the entry while holding down the CTRL key.

 zzz Completing fields

Field

Description

When

Click the zzz button to select a boolean expression from the drop-down list. The form changes to reflect the expression selected.

Most expressions require properties. UseSmartPromptSmartPrompt to select a property.

Require that

This area defines the constraint. Click the zzz button to select an expression from the drop-down list. The form changes to reflect the expression selected.

Most expressions require properties. UseSmartPromptSmartPrompt to select a property.

You can't specify single elements of a Value List, Value Group, Page List or Page Group in property references here. Use only empty parentheses containing no index or subscript, for example:

pyWorkPage.pyWorkParty().pxCity = "Chicago"

Else add message

Optional. Type the text of a message within quotes or identify a Message rule. Use SmartPromptSmartPrompt to see both the Rule-Message key and text. You can choose any message; these are commonly used:

  • ValueRequired — Value cannot be null (blank)
  • ValueOutOfRange — Value is out of range

Some messages require parameters. To provide fill-in-the-blank text values for each parameter, follow the key name with a backslash character, the single letter t, and text for each message parameter.

to

SmartPromptOptional. Identify the property to be marked with the message. The message remains until this property has a new value (or until an activity performs a Page-Clear-Messages method).

Ordinarily, choose the property that failed the constraint. Some constraints involve two or more properties, on the same or different pages. Select the one most likely to have a new value that will restore the constraint condition.

For example, if the constraint is of the form

BoxWidth IS LESS THAN 40

then the message can be associated with the BoxWidth property. If the constraint has the form

BoxWidth IS LESS THAN BoxLength

then the message can be associated with either property.

NoteIn unusual cases, you can leave this blank. When you leave this blank, the message is associated with the entire page rather than a property on that page. However, this is temporary, as page messages are removed upon the next user HTTP Submit operation.

NoteYou can't use symbolic page names (such as primary or steppage) here, as they are not meaningful except within an activity execution context.

zzz About Constraints rules