Developer

Property Browser Details: Complex Table-Related Options

The Property Browser provides several options for selecting a record from a complex table. Ultimately a specific field from the selected record is returned in almost all contexts. The specific field is a part of the target path created using the Property Browser. The selection criteria for the record can be based on one of the indexes defined within the complex table. When using an index, the first record, last record, or one selected by performing a search based on that index are all options. Searching on indexes in a complex table using a target path also includes support for parent-child indexes, if they are defined.

Target Paths for Complex Table Records

When a complex table record is targeted, the target path will ultimately include the specific field within that record whose value is to be returned. To select a record from a complex table, the selection criteria options are either the current record in the complex table, which is determined by context, or by using one of the indexes defined within the complex table. The following is an example of options provided in the Property Browser for a complex table definition:



The options displayed here include the following:
  • The current complex table record
  • Range of records by index
  • Select the first record in an index
  • Select the last record in an index
  • Select a record based on a rule
  • Select the record using a child index within a parent index

The Current Complex Table Record: This option creates a target path that returns the current record in the complex table. The concept of the current record can be somewhat flexible and is based on the context of the target path evaluation. In general, the current record in a table is one that is currently selected in a list that displays complex table records, or some similar behavior.

Range of Records by Index: Within a complex table there will always be one or more index definitions. The index provides order to the records of the complex table based on the values of a field within the records. indexes are defined to support both sorting and searching behaviors. When selecting records by using an index, right clicking on the node Range selected by index “IndexName displays a context menu where the search value is specified. The source for this value can be either the value returned by a rule definition, or by creating a nested target path.

In the case of a rule, the rule itself is evaluated in the context of the parent definition for which the target path is being generated. The data type of the rule context matches the data type of the field for which the index in the complex table is defined. So if the index is defined for a field with one of the four string data types, the rule is evaluated in a string context and this is the data type of its return value.

In the case of a nested target path, a second Property Browser is opened and the source for the value to search on can be selected. Note that in this case, the source selected must be of the same general data type as the field to which it is compared. If the complex table field is a string, the search value must also be a string. The Agentry Client does not perform any data conversion for this comparison as it does in other situations.

Whether using a rule or some other data source for the search value, at run time the Agentry Client searches the complex table using the search value and the selected index. The resulting record may be either a single record or a range of records with the matching value. When selecting a range, the return should be for some list that supports displaying complex table records. This behavior allows for creating a temporary list of records that is a subset of all records in the complex table. This subset is dynamic in the sense that the source for the search value may return a different value under different conditions, especially when a rule definition is used. When a range of records is to be returned, the specific field from those records is not selected.

Select the First Record in an Index: When selecting the node First Record in Complex Table Index “IndexName, the Agentry Client uses the order provided by the selected index to select the record, with the first record in the index being selected. A single field is selected for this option as the value returned for that record. As an optional behavior, right clicking on this node presents a context menu that allows for the specification of a record position within the index, counting up from the first record, which is at position 1.

Select the Last Record in an Index: When selecting the node Last Record in Complex Table Index “IndexName, the Agentry Client uses the order provided by the selected index to select the record, with the last record in the index being selected. A single field is selected for this option as the value returned for that record. As an optional behavior, right clicking on this node presents a context menu that allows for the specification of a record position within the index, counting back from the last record, which is at position 1.

Select a Record Based on a Rule: When selecting the node Select Record in Complex Table Index by Rule, a rule definition is selected or defined by right clicking this node and selecting the appropriate option from the context menu. The rule used here is evaluated iteratively, once for each record in the complex table, until a match is found. The data type of the rule’s context is Boolean.

The record selected is the first for which the rule returns true, by default. The order in which the records are processed is dictated by the order established by the index definition. As optional behaviors, the target path can be defined to select the first record for which the rule returns false. Also, the last record within the index for which the rule returns true (or false if selected) can be returned instead. Both of the optional behaviors are set by selecting the corresponding options in the context menu displayed for this node.

Select the Record Using a Child Index Within a Parent Index: When a child index is defined within the complex table, expanding the parent index reveals options for that child. These options are the same as the others for an index. However, the overall behavior includes child index searching. When one of these options is selected, selection criteria must also be specified for the parent index. Specifically, the selection of a range for the parent index must be specified, along with one of the selection options for the child index. This is required due to the nature of parent-child indexes in complex tables.