Back Forward Help: Using the Data Table wizard

To define the new class and its properties, complete the Data Table wizard form:

  1. Choose a name for the new class that is unique system-wide. Do not end the class name with a dash character. Do not choose "data".
  2. Enter a description for the new class.
  3. Identify an existing class as the parent class. Choose a class derived from the Data-base class.
  4. Check to cause the wizard to create a new database table in the PegaRULES database to hold the rows of the data table. As a best practice, use a dedicated table if you expect the data table to grow to more than 1,000 rows or have many properties that will need to be exposed as individual columns.
  5. Use add row to add a new property to the data table. For each property for this data table (class):
    1. Enter a name (Name) and description (Label).
    2. Select a Type for the property.
    3. Specify whether the property is Single Value or Value List.
    4. Optionally, specify an edit validation rule (Rule-Edit-Validate rule type) in the Validation Class field, specify the number of characters for the expected and maximum display sizes (Exp. Size and Max Size), or indicate that data is required (non-blank) for this property by selecting the Required checkbox.
    5. If you want a particular property to be part of the key for this data table, select the Key checkbox.

      A data table is required to have at a unique key. There must be at least one column that has Key selected. When you first open the Data Table wizard, the system creates a text property with a label of ID, and sets it as the unique key to the data table. You can modify this column before generating your new data table.

      The system automatically includes a column named pyLabel in your data table. This is a required column.

  6. Optionally, select the Create Dedicated Database Table checkbox. See below for details.
  7. Click  Generate   to generate the data table. The system creates the new class and associated properties and rules, and displays a summary of what was created with links to the associated rules.

From the summary, you can click the List Editor link to use the Data Table editor to add data instances (rows) for the new data table; otherwise, click  Close   to return to Designer Studio.

Class Information

Class Name

Enter the name for a new concrete class. By convention, classes used with the Data Table editor are derived by pattern inheritance from the Data- top-level class.

Description

Enter a text description of this class.

Derives From

Identify the parent class, typically Data- or a class derived from Data-.

Create Data Pages? Select to cause the wizard to automatically create data pages for this data table. Use the following two fields to name the created pages.
Lookup Data Page If the above checkbox is checked, enter here a name for the page-structure data page the wizard creates with a lookup data source defined directly against the data table class. The name must begin with "D_" or "Declare_".
List Data Page If the above checkbox is checked, enter here a name for the list-structure data page the wizard creates with a report definition data source defined directly against the data table class. The name must begin with "D_" or "Declare_".
Create Dedicated Database Table

Select to cause the wizard to associate a new database table (named pr_zzzzz, where zzzzz is the value you entered in the Name field) to hold the rows of this data table. This is useful if you expect the table to contain more than 500 rows, or to be scanned (searched) frequently, or expect to expose specific columns for reporting purposes. If not selected, the new class is mapped to the pr_other table.

You must hold the @baseclass.SchemaTableCreation privilege to directly update the database schema by creating a new table. In addition, the production level must be 1 or 2.

Properties

Key

Select to indicate that this property is part of the definition of the unique key to the class. There must be at least one property that has Key selected.

Name

Enter a property name. Start with a letter and use only letters, digits, and the dash character. You cannot create property names that start with px, py, or pz.

Label

Enter a description of this property.

Type

Choose a property type (for example, Integer).

Mode

Choose either Single Value or Value List mode.

Validation Class

Optional. If the allowable values of this property are defined by the key values of another class that has a single key part, identify that class here.

Exp. Size

Optional. Enter an expected width in characters for the property value.

Max Size

Optional. Enter a maximum width in characters for the property value.

Required

Click to require that this property have a non-blank value.

RuleSet

Identify the RuleSet for the classes, properties, and other rules that support the Data Table.

Version

Identify the version of the RuleSet.

Notes

If you add a property (column) to a previously created data table, you must open and update the associated list rule (Rule-Obj-List rule type) to have the new property available to the Data Table editor.

UpAbout the Data Table wizard