Object Properties

 The Object Properties editor tab is used to access the properties of each Knowledge Explorer object, covering various aspects of the Object covering both, design-time options and functions as well as Runtime inference functions and display. A separate Tab is used to access the Value Properties for List Objects

This section details all the Object properties that can potentially be seen on this editor Tab (grouped by Property Category then sorted alphabetically). Please note that some properties only apply to certain deployment modes.

If the Show Advanced Properties is enabled (Project Tools - User options) then the following view will be shown:

If the Show Advanced Properties is disabled (or by clicking on the icon) then only the most commonly used properties are show:

Also Depending on your version of Knowledge Builder and on the Base Class from which an Object is derived, not all of the below properties may be shown. Also note that some of these properties may be hidden by the Object’s Base Class read/write settings.

Full List of Object Properties

description

The description property is an optional text which can be used for documentation purposes. It is also the default runtime capture prompting text property (see questionTextPrompt)

Format

decPlaces: This integer property for numeric attributes can be used to specify the number of decimal places. This is used for display purposes but can also optionally be used to specify the decimal places precision used to store a number (see the Use Max Numeric Pricision Knowledge Module Setting) 

multiSelect: By default, List Attributes are set for a single value selection at runtime. However, they can be set to handle multiple values being selected by changing the multiSelect property to true. The implication for the developer is that a multi-select Attribute has different operators and comparators when used in Rules and Procedures. When the multiSelect property is set, the object's icon will have an extra small green dot below ithttp://help.xpertrule.com/11_1/help/_images/image78.JPG

When you capture a list attribute via a user dialog you can also impose further control over the maximum and minimum number of items that the user can select by using the MultiSelMax and MultiSelMin properties of List box controls.

Note that values can be assigned to multi select list objects in scripts using @Assign command and placing the values in square brackets[], for example:


 @Assign myList = []
 @Assign myList = ['c']
 @Assign myList = ['a','d'] 
 @Assign myList = myList + ['b']
 @Assign myList = myList - ['c']

The selected values of a multi select list object can also be scanned:


 @For index = 1 to myList.nValues
   @If myList.selected[index] = True
     @Debug myList.ItemName[index]
   @Endif
 @Next

Also see the @ListOp command

Default

Default: This property specified the default value that can be used when the Object is used when it is blank. Note that the defaultMode property must also be set for this to take effect.

defaultMode: This property determines whether and how the default property value is to be used at runtime. It is also a mechanism to enable/disable default values use without needing to clear/re-set the default property. defaultMode has 3 settings:

Knowledge

hasCases: Setting this property would enable this Cases editor tab  See the section on Cases.

hasEvents: Setting this property enables this Events editor tab . This allows scripts to be defined for a set of pre-defined events which are executed when these events occur at runtime. See the section on Events.

hasTree: Setting this property enables the Decision tree editor tab  This property can in essence be the difference between an Attribute and a Decision Tree object in Knowledge Builder. See the section on Decision Trees.

knowledgeMode

The selections available for the KnowledgeMode property depend on whether you are using the Cases (i.e. hasCases = true) and/or the Decision Tree (i.e. hasTree = true) with this object. Because you can have both Cases and Trees at the same time (e.g. for when you want to induce a Tree from Cases) the knowledgeMode property specifies which one of these two the knowledge representation is invoked at runtime.

Note that the Inference properties in the following topic then provide more detailed control over how the inference process is then applied to that particular knowledgeMode.

selectionRule. This property works in conjunction with Tree Dialog Inference (see selectionMode). If set to True then a selection Rules Tab will appear which allows the Object value to be set to bypass questions.

Inference

casesPrompt. If set to True and the knowledeMode is set to Cases then, inference on this Object will prompt for the Objects in the Cases view (Left to right)

ConstraintMode (optional) See Constraint Inference

isDynamic By default this is set to False for Attributes which means that once the runtime engine has obtained a value for an Attribute, and the inference process encounters the same attribute again, then it will not prompt for it or evaluate it again. Changing the isDynamic to true has the effect of setting the attribute to be evaluated every time it is encountered in during inference. The inference process will then always ‘prompt’ for a value of this dynamic attribute. The OnCapture Event of a dynamic attribute would also be executed every time a dynamic attribute is encountered. For Decision Tree Objects, isDynamic to usually set to true, so the Tree is re-executed if it is encountered again (if all the Attributes inside this Tree have their isDynamic property set to false then they would not be prompted for again).

selectionMode This property sets the inference for mode the object with the following possible settings:

Hierarchy

hasChildren. This property is maintained automatically when building a Hierarchy Object.

isSelected. This property determines if a node is included in the generated runtime hierarchy

setChildContexts. Where multiple instances of the nodes are included in a hierarchy, this property determines if the hierarchy sub-nodes are referenced  relative to the current instance of their parent-node at runtime.

Display

allowBlank When set to true, the allowBlank property allows the runtime value to be blank when leaving a dialog  i.e. user entry is not obligatory. This property applies to objects where the multiSelect property is set to False, for objects where the multiSelect property is set to True then the allowBlank property has no effect.

allowDeselect. If this property is set to True then the user interface allows a selected List value to be de-selected

allowInvalid If this property is set to True then the user interface allows an “invalid”  selected List value to be selected (constraint inference)

helpText. This property allows help text to be displayed when an icon next to the control is captured

hiddenValuesProp. This property allows a Boolean Instance Property belonging to this Object to be used to deterimine if a given list value is to be hidden at runtime.

inputMask: This property is used to control the runtime data entry for Text objects. The mask is defined as follows;

isEnabled When the isEnabled property is set to true the value can be changed at run time.

isVisible The isVisible property must be set to true for the object to be visible to the run time user.

maxValue/minValue The minValue and maxValue properties are used (JavaScript Web Deployment only) to validate the values of numeric & date Attributes captured on a Dialog. This validation check is triggered when the focus is moved away from the control (e.g. pressing the Tab key or clicking on a Button control). This validation check is only triggered if minValue < maxValue and any existing user-defined control "validation" returns a valid status

If the entered Attribute value falls outside this min/max range then the control's border is highlighted, the valid range is displayed to the right of the control and the normal Dialog exit (e.g. when clicking an OK button) is prevented.

The minValue & maxValue properties are also used (JavaScript Web Deployment only) to restrict the range of values of Date Attributes captured on a Dialog.

If the Date Attribute is types via the keyboard and this value falls outside the min/max range then the control's border is highlighted and the normal Dialog exit (e.g. when clicking an OK button) is prevented.

The following example sets the minValue & maxValue properties to restrict the Calender date range to 1 week from today's date:


 @Dim x:N
 @Date Start_Date
 @Assign Date_Attribute.minValue = Start_Date
 @Assign x = End_Date + 7
 @Assign End_Date = x
 @Assign Date_Attribute.maxValue = End_Date

where Date_Attribute, Start_Date & End_Date are all Objects of type "Date"

questionTextPrompt This is the name of the Attribute’s string property to be used for prompting at runtime. By default this is set to the description property.

reversePreviousAnswers. This property works in conjunction with Tree Dialog Inference (see selectionMode) If set to true then the most recent answered questions will appeat at the top of the list of previously answered questions.

showInvalid

showOnTreeDialog

sortProperty. This property can be used to specify the instance property used to sort the List values by when captured using a Grid Control. For example, if you have a cost property to a List Attribute, you could sort the List values by cost.

sortDirection: This property works in conjunction with the sortProperty display property. If sortProperty is set to an instance property of type LIST or STRING (e.g. set to "Value" if you wish to sort the instances by the first column), then the sortDirection sorts the instances of the object alphabetically in Ascending or Descending order in a Grid Control.

sortInvalid. This property is used when the ‘invalid’ List values (using constraint inference) are to be grouped at the bottom of the list during dialog capture

tiedDialog A dialog object can be tied to the Attribute by using this property whic his shown whenever the inference engine needs to capture a value from the user at runtime. See the section on Dialogs and the section on Using tied objects.

Database

These database properties can be used to set the update modes from an 'ODBC' compliant database table. This can be used to bring in attribute values, along with any additional property columns that you have created on the instances window.

caseDBmode This property specifies the method of connection when updating Cases from an external database table.

extendInstances. The extendInstances property specifies if Cases are allowed to be extended with new values during update from an external database table. If a new/unknown value is encountered in the database (i.e. one that you have not included within the definition of the List attributes within your Cases) then this allows it to be added.

Note that this works by you setting the extendInstances property for each List attribute object to allow its values to be extended. It does not work just by setting the property for the object that holds the table of Cases.

instanceDBmode. When updating Instance Properties from an external database table, this property specifies the method of connection when used for Attribute Values, etc.

Documentation

docDescription. This text will appear when using the Export Documentation Option

includeInDoc. If set to true then this apploect will be included in the documentation generated by the Export Documentation Option