Back Forward Declare Index form
Completing the Indexes tab

About Declare Index rules

Use this tab to convey how and when the system constructs an index in a database. The system forms an index instance from the Purpose key part of this rule and the handle of the base instance.

Index Class Data  
Source Page Context

Identify a page that contains the properties used in completing the index data. Typically, this is an embedded page.
Alternatively, enter a pattern that is a Page List or Page Group property reference, but omit the index (subscript). For example, enter:

.PageList().EmbeddedPage.AnotherPageList().

to cause the system to create an index for every embedded page in a top-level page that fits this pattern.

Source Page Context Class

Identify the class of the page or pattern entered in the Source Page Context field, typically a class derived from the Embed- base class. In most cases, set this value to match the PageClass field on the General tab of the property rule.

You cannot use the keywords $ANY, $NONE, or $CLASS here.

Index Class to Write

Identify a concrete class derived from the Index- base class that is to contain the index instances maintained by this rule.

Properties for Indexing and Mapping

zzzEnter in this array the sources of property values to be saved in this index. The order of sources is significant; this determines the sort order of index instances.

TipTo reorder the rows of this array, hold the mouse pointer over a number. Click and drag to another row. To duplicate or move a row, hold the mouse pointer over a number. Or, right-click to access a context menu with Cut, Copy, and Insert options.

Source Class Property

SmartPromptEnter a property reference to a Single Value mode property including a preceding period character. The property may have any Type, including DateTime, Decimal, or Integer. This property need not be a distinct exposed column in the database table that contains the source class.

Two page name keywords may be useful in this property reference:

  • Use the keyword parent followed by a dot to refer to the page that is one level up from the class identified in the Source Class Context field. (You can use parent more than once to reference higher-level pages.)
  • Use the keyword top followed by a dot to refer to properties on primary ( top-level) page of the Applies To class.

For example, from the context of property AnotherPageList(4) of a page

Green.PageList(3).ZEmbeddedPage.AnotherPagelist(4)

a reference to parent.Width identifies a property on ZEmbeddedPage. A reference to top.Diameter identifies a property on the Green page, a top-level page.

(no label)

Select Equals.

Index Class Property

SmartPromptIdentify in each row of this array the destination property, available in the class you entered in the Index Class To Write field, that is to hold the value of the source property.

Indexing Conditions  
When

SmartPrompt Optional. Enter the second key part of a when condition rule to further qualify which indexes are created by this rule, or an expression resulting in a Boolean value.

The system uses the Applies To key part of this Declare Index rule as the Applies To key part of the when condition.

NoteThe system evaluates this rule or expression each time an instance of the Applies To class is saved by any requestor. Both outcomes — true and false — may create or remove indexes:

  • If the condition or expression is false, no Index- instances (from that Applies To instance) must be present. None are added. Any existing Index- instances are deleted.
  • If the condition or expression evaluates to true, Index- instances appropriate to this Declare Index rule are added. Previously created Index- instances may be deleted.
Enabled

Select to turn on automatic indexing from this rule. Clear this box to prevent any more indexing based on this rule.

CautionClearing the box does not delete any index objects. Clearing the box after the box was selected for a while may allow invalid or stale index instances to remain in the database.

Index even when a source property is blank?

Select to cause Process Commander to create index objects even if one or more of the Source Class Properties listed has no value.

Clear to create index objects only when all the source properties have a non-blank value.

zzz About Declare Index rules