Setting Record Field Properties

This section provides overviews of record field properties and record key considerations, and discusses how to manage record fields.

When you add a field to a record definition, you must define attributes for how the field is used in that record. These attributes include key settings, default values, table edits, and PeopleCode programs.

The properties of record fields are not shared among records; they are specific to a single record definition and are stored with the record. Therefore, even though you might add the same field to multiple records, each record stores a unique set of record field properties, while the primary field definition remains the same.

When you access field properties from within a record definition, you set the record field properties, not field definition properties or record definition properties.

To edit record field properties from a record definition, select the record field, then select Edit > Record Field Properties from the PeopleSoft Application Designer menu. You can also double-click a record field to set the properties.

When creating key fields in your record definition, keep in mind several guidelines that are discussed in the following topics.

Records With Multiple Keys

You can specify more than one field as a key to a record definition; that is, a record definition can have a compound key. This example shows a compound key structure:

Image: Example of a compound key structure in the PO_LINE record definition

This example illustrates the fields and controls on the Example of a compound key structure in the PO_LINE record definition. You can find definitions for the fields and controls later on this page.

Example of a compound key structure in the PO_LINE record definition

The keys to the PO_LINE record definition are BUSINESS_UNIT, PO_ID, and LINE_NBR. Therefore, each purchase order must be unique to a business unit, and each line item in a purchase order must have a unique number.

Keys in Parent and Child Tables

In some cases, you have a field in a table for which you want to allow multiple occurrences, in which case you create a subordinate or child table. For example, for employee reviews, an employee can be reviewed for performance in multiple categories—organization skills, interpersonal skills, and so on. These categories and ratings are stored in a separate child table, EE_REVIEW_RT, which is directly related to REVIEW_DT, the parent table that stores information about employee reviews.

The keys that you establish in a parent record definition determine which keys are required in child record definitions. The child must have the same keys as the parent, plus one or more keys that uniquely identify each row:

 Item

Parent Table

Child Table

Record Definition

REVIEW_DT

EE_REVIEW_RT

Key Fields

EMPLID

REVIEW_DT

EMPLID

REVIEW_DT

CATEGORY

Most record definitions have either one primary key, or multiple keys that comprise independent, or parent and child key combinations. Exceptions exist, however, such as record definitions without keys and duplicate order keys.

Records Without Keys

Some record definitions, such as INSTALLATION, do not require keys because only one row of data exists in the table. Whereas a table normally has keys to help distinguish between multiple occurrences of data, when a table has only one row of data you do not need to distinguish one row from another. Another primary use for keys is to build database indexes to rows; because each table has only one row, the record does not need indexes. This example shows a record definition with no defined key structure:

Image: INSTALLATION table: example of record definition with no defined key structure

This example illustrates the fields and controls on the INSTALLATION table: example of record definition with no defined key structure. You can find definitions for the fields and controls later on this page.

INSTALLATION table: example of record definition with no defined key structure

Records With Duplicate Order Keys

Occasionally, you might encounter situations in which a unique identifier for each row does not exist. Duplicate order keys are a way of ordering data in the table when duplicate values are allowed.

For example, in the EDUCATN table, PeopleSoft developers anticipated that an employee can receive two degrees of the same type on the same date. For example, though rare, Simon Schumaker could receive two honorary degrees in computer science on the same day. Because no unique identifier exists—the employee ID, date earned, and degree are all the same—the user must maintain the data differently. The key, instead of defining a unique row, defines a group of rows. In that group, you must determine the order in which you want to display the information.

In the EDUCATN record definition, three keys together determine how information is stored and retrieved. EMPLID identifies the group of rows; and the placement of the duplicate order keys, DT_EARNED and DEGREE, instructs the system to order rows in the group first by date and then by degree:

EMPLID

DT_EARNED

DEGREE

8001

June 1, 1992

June 1, 1992

HON

HON

The system concatenates or joins keys when it checks for uniqueness. In this case, the system accepts duplicate entries in the DEGREE and DT_EARNED fields because they are part of a set that is identified by EMPLID.

Note: Records with duplicate order keys should not have related language tables associated to them. If the record requires a related language record, you must remove the order keys. Do not create a related language record with a duplicate order key.

Note: If you intend to perform data integrity validation on your record data when the system performs a save, don't use duplicate order keys on your record. With duplicate order keys, the system cannot ensure a unique row of data for validation.

Note: If you create a duplicate order key on a record, you see a warning message when you save the record. During runtime, there is more information written to the log file. Use the Set Trace Flags option Component Buffers Before Save, and search for more information in the log file.

Ordering Keys

The position of keys relative to one another is critical in a record definition; always list them in order of importance. The primary key must be the first field in the record, followed by the next most important key, and so on.

Key fields are followed by duplicate order keys, in order of importance, and then by fields that are not keys. You can scatter alternate key fields anywhere among regular fields, in any order. They do not need to be grouped.

Key, Duplicate Order Key, and Alternate Search Key are mutually exclusive.

Note: The display of key fields in record definition views does not always match the order in the record. Always check the Num column to see the actual order.

Each alternate search key that you configure creates a database index when the SQL creates the table. While database indexes are important, they consume disk space and, when the system must support the alternate key, processing time. Therefore, do not add alternate search keys unless you really need them.

For both records and subrecords, you can only add 10 alternate search keys.

As you add fields to a record definition, you must decide which fields uniquely identify each row; these become the record keys. The nature of the data that you are storing should naturally determine the keys for the information in the database.

The record field properties options that are available for field types might vary slightly; for example, some of the properties that you assign might be relevant only to a character field in a record and not to a date or time field. However, all of the options are described in this section. This example shows the available record field properties options:

Image: Record Field Properties dialog box: Use tab

This example illustrates the fields and controls on the Record Field Properties dialog box: Use tab. You can find definitions for the fields and controls later on this page.

Record Field Properties dialog box

Keys

Field or Control

Definition

Key

Select to identify the field as the search criteria that uniquely identifies each row. You cannot have duplicate values for primary keys. For example, EMPLID is the only key to the PERSONAL_DATA record definition. Therefore, EMPLID must be a unique value for each employee, and only one PERSONAL_DATA row can exist per employee.

Duplicate Order Key

Select to indicate that duplicate values can occur. The order in which you place duplicate order keys in a field list determines the order in which the system retrieves duplicate keys.

Alternate Search Key

Select to make this field part of the search structure when accessing your application data. Duplicate values are allowed in an alternate search key field.

If you define a field as an alternate search key in a search record or prompt record, the system includes the field on the dynamically generated search page or prompt lookup dialog box that you use to enter search criteria.

Descending Key

Note: This option no longer produces an index with descending order.

Select to identify the field as descending if you want rows of data to be retrieved in reverse alphanumeric order (for example, 3, 2, 1). If you deselect this check box, the key is ascending, meaning that rows are stored and retrieved in alphanumeric order (for example, 1, 2, 3). This option applies only to a field that is specified as a key, duplicate order key, or alternate search key. PeopleSoft applications use descending order primarily for effective date fields; most character keys are ascending.

Search Key

Select to make the field available for entering search criteria on the basic and advanced search pages, the lookup prompt pages, and as a column that is stored in the menu structure for persistent searches. A search key is valid only for keys and should be used only in search and prompt records. If you select this check box, the system automatically selects the List Box Item check box.

Search Edit

Enabled only if Search Key is selected. Select to enforce the required property and table edits on the search page. It also enforces these edits under circumstances in which the search page would be bypassed. When this option is enabled, the user no longer has the ability to perform partial searches on this field.

List Box Item

Select to include the field as a column in the search results grid on:

  • Standard component search pages. The system includes all fields designated as list box items in the search results list.

  • Prompt lookup pages. The system includes all fields designated as list box items in the search results list.

  • Recent (persistent) search results pages. The system includes no more than five list box items in the search results list.

    Note: This behavior is the default. To explicitly define which fields appear in the recent (persistent) search results, you must set other configuration options.

See Configuring Caching.

See Configuring Search Results Grid Columns in Persistent Searches.

If the field has values in the translate table and you designate it as a list box item, the list box automatically shows the translated value instead of the code.

If you select this check box, the system enables but does not select the Persist in Menu check box.

From Search Field and Through Search Field

Select for fields that are used as search records. If you select From Search Field, the displayed list contains rows in which the field value is greater than or equal to a value that the user enters. If you select Through Search Field, the displayed list contains rows in which the field value is less than or equal to a value that the user enters.

If you do not want these fields to be in a search list box, clear the List Box Item check box, even if the field is an alternate search key.

Default Search Field

Select to control which field name appears in the Search By drop-down list box on the basic search page.

Disable Advanced Search Options

Select to prevent runtime search pages from displaying advanced search features for this field.

Allow Search Events for Prompt Dialogs

Select to enable the SearchSave and SearchInit PeopleCode events on a prompt dialog for this field. The default value is Cleared.

Note: Limit your use of these events in this context. The amount and complexity of the PeopleCode affects the speed of data retrieval.

Audit

Field-level auditing captures updates to selected fields and records the information in PeopleTools audit tables.

Audit options apply only to data that is manipulated on a normal PeopleSoft application page through component processing. These options do not apply to data that is added using means other than component processing, including SQLExec, Record.Insert, or Record.Update PeopleCode.

PSAUDIT and PSAUDITEXT are the standard PeopleTools audit tables for field-level audits. Both audit tables log identical information such as the user ID, time of change, and so on as well as the values of audited fields both before (OLD) and after (NEW) any changes.

Note these differences in the field properties of the two audit tables:

  • In the PSAUDIT table, the field length of the OLDVALUE and NEWVALUE fields is 65 characters.

  • In the PSAUDITEXT table, the field length of the PTOLDVALUE and PTNEWVALUE fields is 254 characters.

If you are auditing a field with a field length greater than 65 characters, you should query PSAUDITEXT to retrieve the field value.

Note: If a value is too long to fit in the audit table, the system writes an error to the appserv.log, and no row will be inserted into the audit table. This applies to the OLDVALUE and NEWVALUE fields in PSAUDIT and the KEY1-KEY15 fields in both PSAUDIT and PSAUDITEXT.

You can control when the fields are audited. For example, you can only record changes or deletions, depending on business requirements. To audit several fields in a record definition, consider specifying audits at the record definition level.

Field or Control

Definition

Field Add

Audits this field whenever a new row of data is added.

Field Change

Audits this field whenever the content changes.

Field Delete

Audits this field whenever a row of data is deleted.

Miscellaneous

Field or Control

Definition

System Maintained

Select to indicate that the field value is system-generated. This option is for documentation purposes only and does not affect processing.

Auto-Update

Select to have the field updated with the server’s current date and time whenever a user creates or updates a row. Any user entries—even if permitted on a page—are overwritten by the server time.

In Memory

Field or Control

Definition

In Memory

Select to enable the Oracle In-Memory Column Store feature for this record field.

This check box is enabled only if the Oracle In-Memory option Selective Fields is selected for the record definition to which the record field belongs, and the field is supported for Oracle IM column store processing.

If the Oracle In Memory option All Fields is selected for the record definition to which the record field belongs, and all the fields for this record definition are supported for IM column store processing, the In Memory check box for the record fields will be selected automatically and greyed out (disabled).

Note: If a field is not supported for IM column store processing, the In Memory check box will be greyed out (disabled) and cleared automatically.

For more information on implementing the Oracle In-Memory Column Store feature, see Setting Use Properties.

Record Field Label ID

Specify which label, long name or short name, to use for the record. The default value is ***Use Default Label***. This setting enables you to change labels of record fields dynamically anytime that the default label on the field definition is changed.

For example, a field definition has three labels:

  • Label1 (Long Name1, Short Name1), marked as default.

  • Label2 (Long Name2, Short Name2).

  • Label3 (Long Name3, Short Name3).

When the label ID in a record field is set to Use Default Label, initially the long name and short name are Long Name1 and Short Name1. If the default label is changed to Label3 in the field definition, then the long name and short name automatically become Long Name3 and Short Name3.

Default Value

Select the most commonly used value as the default. You can always enter a different value if the default is inappropriate. The more defaults that you provide, the more data entry time you will save your users.

For a field, you can enter a default value as a system variable or as a combination of record and field names.

Field or Control

Definition

Constant

Specify a default value.

This value is case-sensitive. If the record has translate values for this field, the values appear in a drop-down list.

You can specify a system variable only when you want to display the value of the current date or time. The accepted system variables to be used as constants are:

  • %DATE for DATE, TIME, or DATETIME fields.

  • %TIME for TIME fields.

  • %DATETIME for DATETIME fields.

  • %CLIENTDATE for DATE, TIME, or DATETIME fields. Note that in this case %CLIENTDATE is only relevant for a DATE field. Otherwise it behaves the same as %DATE.

Record Name and Field Name

Enter the record and field names of the default value.

Field or Control

Definition

Default Page Control

Specify the default appearance of a field as it appears on the page that corresponds with the record field that you are creating.

Currency Control Field

Enables the user to specify where to find the currency code that is used to display the currency symbol, decimal digits, and scale of a number field. To use this option, the multicurrency option must be set. You might also want to enable the current display when you define the field on the page.

Autocomplete Configuration

Note: Autocomplete is sometimes referred to as “type ahead.”

Field or Control

Definition

Disable Autocomplete for this field

Select to disable the autocomplete process for this field at runtime.

Note: If selected, the end user cannot personalize autocomplete settings for this field.

This setting enables you to control the autocomplete process for certain fields at design time. For example, in some cases, the autocomplete process for a field may be unnecessary or it may present undesired performance impacts.

Enable Autocomplete when used in Search Record

Select to make this field appear as a column in the autocomplete list when the containing record is used as a search record.

This field is enabled for character, number, and signed number fields if the following conditions are met:

  • The Default Page Control field value is Edit Box or System Default.

  • The field is a search key or an alternate search key.

Persist in Menu Configuration

Field or Control

Definition

Persist in Menu

Select to explicitly include the field as a column in the search results grid of a persistent search; select only if the field does not appear in the search results grid by default.

The Search Key and List Box Item properties determine which columns appear in the search results grid by default.

You must enable recent search results caching at the system level in the web profile for this property to take effect.

See Setting Record Field Properties.

See Configuring Caching.

Important! If you select this check box for any record field in a search record, then the search results grid uses this property—not the list box item property—to determine all fields that appear in the grid. Consequently, you must select the Persist in Menu check box for each record field that you want to include in the search results grid.

See Configuring Search Results Grid Columns in Persistent Searches.

Time Zone and Related Date Fields

These fields are enabled only if the current field is a time or date and time field. They determine whether the field is displayed or entered in a specified time zone.

Field or Control

Definition

Specified Time Zone

Times are always stored in a database base time zone, but when you place a time field on a page, you can display the time in the base time zone or another time zone.

If you deselect this check box, the time appears in the database base time zone. If you have users in multiple time zones, you can reduce confusion by showing the time zone along with the time.

If you select this check box, the system converts the time according to the time zone specified in Time Zone Control field. This control field must be a field in the current record. Set an appropriate default value for the time zone control field.

Date Control Field

Select which related date field in the current record stores the calendar date to which this field should be adjusted.

Typically, you want to make a date field a descending key so that the row with the latest and most current time appears first. If you want the default value to be the current system date, enter the value %date (or %time) as the constant in the Default Values group box.

In general, each Time record field that is related to the Time Zone field should also be related to a Date field in that same record. Otherwise, the time data that appears or is saved may not properly reflect the appropriate state of daylight savings in that time zone. Furthermore, each Time record field should be associated with a different Date record field.

For applications where two Time record fields need to share a common Date record field (as in, records with a start time and an end time always occurring on the same date), you can relate each Time record field to the same Date record field. However, keep in mind that the Date record field will only consider itself associated with one Time record field—the related Time record field that has the earliest position in the record field ordering for that record.

The Persist in Menu property enables you to override the default fields that appear on the persistent search page and explicitly determine which fields the system includes in the search results grid. If you select the Persist in Menu property for any record field in the search record, then you must select the same property for each field, including search key fields, that you want to appear as columns in the search results grid.

Note: This property, when selected, controls the appearance of the persistent search results grid. Search key fields remain in the menu structure but are hidden from view.

To explicitly define the fields that appear in the results grid for a recent (persistent) search:

  1. Open the search record.

  2. Double-click the field you want to include in the results grid and select the List Box Item check box to enable the Persist in Menu check box.

  3. Select the Persist in Menu check box for the field.

  4. Click the OK button.

  5. Double-click each additional field that you want to include and repeat Steps 2 and 3.

  6. Save the record.

Note: When you save the record definition, PeopleSoft Application Designer alerts you if your custom configuration exceeds the maximum number of fields that can appear in the search results grid of a persistent search page. This alert is informational.

Refer to the following example when applying from and through logic to a search page:

Image: Example of a CNT_CLAUSE_TBL record

This example illustrates the fields and controls on the Example of a CNT_CLAUSE_TBL record . You can find definitions for the fields and controls later on this page.

Example of a CNT_CLAUSE_TBL record

To apply the from and through logic to a search page:

  1. Determine which component you want to change.

    You must modify the search record for a particular page, so you must first identify the appropriate component.

  2. Determine on which field to use the from and through search logic.

    Open the component in PeopleSoft Application Designer and examine the search record that is associated with the component. In the CNT_CLAUSE_TBL record, the search record is CNT_CLAUSE_TBL, and the field to which you want to apply the from and through search logic is CONTRACT_CLAUSE.

  3. Create a new view that contains the same fields as the original search record.

    To use the from and through search logic, the search record must be a view. If the search record is already based on a view, you can modify the existing view instead of creating a new view.

  4. Select the From Search Field property for the field.

    In the new view, select the from search field and apply the following record field properties: Key, Search Key, and From Search Field (List Box Item is optional).

  5. Create a new field with exactly the same attributes as the from field.

    For example, if CONTRACT_CLAUSE represents the field from which you want to search, then create a field called CONTRACT_CLAUSE_TO representing the field through which you want to search.

  6. Insert the new field directly below the original field.

  7. Select the Through Search Field property for the field.

    Select the new through search field and apply the following record field properties: Key, Search Key, and Through Search Field only.

  8. Update the SQL view text.

    Update the SQL view Select statement in the new view to reflect the new column. That is, the view text should select the same field twice in a row (as shown in the example that follows this procedure) because the same field is used for the from logic and the through logic.

  9. Save and build the new view.

  10. Update the component properties.

    You must update the search record so that the component uses the new view.

  11. Test the new search page.

    The search page should now include the new through field so that the user can specify a range of values for the field. Because you want to search on both fields, you must use an advanced search.

    The results in the list box should reflect a range of values between the from and through fields that are specified. The results are inclusive: they include the minimum and maximum values that the user specified.

Example of Updating the SQL View Select Statement

After you define a search field as a Through Search Field, you need to update the SQL view text, as shown in this example:

Image: Example of updating the SQL view Select statement

This example illustrates the fields and controls on the Example of updating the SQL view Select statement. You can find definitions for the fields and controls later on this page.

Example of updating the SQL view Select statement

The Edits tab enables you to specify whether the system is to perform special edits or validations on a record field. You also name the record definition for the prompt table that stores the valid values, as shown in this example:

Image: Example of the Record Field Properties dialog box: Edits tab

This example illustrates the fields and controls on the Example of the Record Field Properties dialog box: Edits tab. You can find definitions for the fields and controls later on this page.

Example of the Record Field Properties dialog box: Edits tab

Field or Control

Definition

Required

Select if you do not want users to skip a field or leave it blank. Users are unable to save their work until they complete all of the required fields on a page.

Note: The system only checks required fields when the page field is changed or the record buffer is changed.

Edit Type

Field or Control

Definition

No Edit

Select if you do not want to edit the contents of this field against a table. This value is the default; it makes the options in the Table Edit group box unavailable.

Table Edit

Select to edit the contents of the field against the values that are maintained in the specified table. When you select Table Edit, the Type field becomes available in the Table Edit group box.

Display in Autocomplete Window

Select to make this field appear in the autocomplete list.

This property is enabled for date, datetime, time, character, number, and signed number fields if the following conditions are met:

  • The field is a list box item.

  • The field is not a search item.

Table Edit

Field or Control

Definition

Type

Select from the drop-down list box:

Prompt Table with No Edit: Provides users with a list of suggested values but does not edit the contents of the field against the prompt table. Users can enter any value. Selecting this option makes the Prompt Table field available.

Prompt Table Edit: Edits the contents of the field against the values that are maintained in the specified prompt table. Selecting this option activates the Prompt Table field. When you enter a prompt table name and exit the field by pressing the tab key, the Set Control Field is activated.

Translate Table Edit: Edits the contents of the field against the translate table. The translate table stores values for fields that must be validated but do not need individual tables of their own. If you select this option, the Prompt Table and Set Control Field fields become unavailable.

Yes/No Table Edit: Makes the values for this field Y (yes) and N (no) only. If you select this option, Prompt Table and Set Control Field fields become unavailable.

For this 1/0 table edit, 1=True and 0=False.

Note: The list of available table edit types is dependent on the field type.

If you add a field (other than with the paste action) to a record and the field name is already defined in the database with previously defined translate values, then the system automatically selects Table Edit and selects Translate Table Edit as the table type. For both Translate Table Edit and Yes/No Table Edit, you should follow PeopleSoft design standards, select Required, and specify a default value for the field in the Record Field Properties dialog box.

Prompt Table

Enter the name of the record definition that you want to use as the prompt table for this field.

If you want the prompt table to vary depending on the context of the field, indicate a field in the derived or work record (DERIVED) that contains the name of the prompt table at runtime. Then, in this field enter %FieldName.

The % is required, and indicates that you are referencing a derived or work record definition named DERIVED. FieldName is the name of the field in the DERIVED record definition.

Set Control Field

Select a set control field that overrides the set control field of the record definition specified in the prompt table. If you do not specify a name in this field, the default is the set control field of the record definition specified in the prompt table.

Reasonable Date

Select if you want the system to test the field value to determine whether it is within 30 days of the current date. If the date is out of range, a warning message appears when the user exits the field.

You can move fields in a record by dragging a field to another place in the open record definition. In addition, you can change the visible order of fields by clicking any of the grid headings. In this sample record definition, the DIM_DATA_SRC_TYPE field is being moved to the location that is indicated by the red line:

Image: Moving field to new position

This example illustrates the fields and controls on the Moving field to new position. You can find definitions for the fields and controls later on this page.

Moving field to new position

To move a field in the same record definition:

  1. Select the field that you want to move.

    Press the Ctrl and Shift keys to select multiple fields at once.

  2. Drag the selected field number to the new position in the record definition window.

    A red line between rows indicates the new placement options as you drag the field. The Num column automatically renumbers the fields.

    Note: The fields are reordered only in the visible display of the record definition, not in the actual table.

To move fields from one record definition to another, you can cut and paste the fields. You can also drag a field from the project workspace into a record definition in the object workspace or between open record definitions.

To move a field from one record definition to another:

  1. Open the two records between which you want to move the field.

  2. Select the field that you want to move.

    Move multiple fields by using the Ctrl or Shift key.

  3. Select Edit > Cut.

    If this is the correct field to cut from the record, click Yes.

  4. Select the new position for the field in the destination record.

  5. Select Edit > Paste to paste the field into the new record definition.

Note: PeopleCode that is associated with fields is not carried over with cut and paste operations. The same is true for delete and undo with field deletions in records. RecordField attributes, such as key, search key, and so on, are retained.

To delete a field from a record definition:

  1. Select the field that you want to remove and press the Delete key.

    This action deletes the field completely and does not copy it to the clipboard, unlike a cut operation, which does copy it to the clipboard.

  2. When the system prompts you to confirm the deletion, click Yes.

    If you already created the underlying table for the record definition from which you are deleting the field, recreate the table or use the SQL Alter function to alter the table.

    Important! If you delete a field from a record definition, you must also delete it from any pages on which it appears. When you delete a field, the system does not automatically delete references to the field in PeopleCode, so you must do this manually. To determine where the field is referenced in PeopleCode, use the Find Object References feature.

    You can also reference the following two reports: "Fields and Records" (XRFFLRC) shows which records contain the field; "Fields Referenced by PeopleCode Programs" (XRFFLPC) shows PeopleCode that refers to the field in the record.

Modify or remove PeopleCode when you find references to the deleted field.

To rename a record definition:

  1. Select File > Rename.

    The Rename Definition dialog box appears.

  2. Select Record from Definition Type.

  3. Click Rename.

  4. Select the record and click Rename.

    A rectangular box appears around the name.

  5. Enter the new name and press the Enterkey.

Results of Renaming Record Definitions

When you rename a record definition, the system automatically renames all references to it, including data in tables with columns named RECNAME where the data matches the record being renamed.

The only references that are not renamed are the text portion of SQL functions, such as SQLExec and Scroll Select, and the record names in the view text. To find the text portion of SQL functions in PeopleCode or record names in view text, select Edit > Find In to search for matching text.

If you already created the underlying tables for the record definition that you renamed, recreate that table. To preserve data in the tables, use the SQL Alter function to rename the database tables.

To delete a record definition:

  1. Select File > Delete.

  2. Select the record definition to delete.

  3. Click Delete.

    Warning! When you delete a record definition, the system automatically deletes any PeopleCode that is associated with the record.

  4. Click Yes if you really want to delete the record definition.

    Note: Notify your database administrator about which record definition you deleted so that the administrator can drop the underlying SQL table and its contents from the database.

You can print your record definitions as references identifying all of the fields and their various attributes—any special use, edits, or PeopleCode that you applied.

To print a record definition, it must be open in the object workspace.

To print a record definition:

  1. Select File > Print Setup to change any of the print record defaults.

    The system retains your changes until you reset them again. The Print Setup dialog box appears.

  2. Select printing options.

    Field or Control

    Definition

    Definition

    Print a picture of what the definition looks like.

    PeopleCode

    Select if you want the report to include a listing of any PeopleCode programs that are attached to each field, identifying the program type and listing all of the PeopleCode statements. Selected by default.

    Graphics

    Not used for record definition printing.

    Margins(mm) [margins (millimeters)]

    Set the distance (in millimeters) from the edge of the page to the left, right, top, and bottom edges of the page image or report. The defaults are: 20 (top), 5 (bottom), 5 (left), and 0 (right).

    Header

    Print a header at the top of the report indicating the date and time at which you printed the report and the database name, record name, version number, and page number. Selected by default.

    Footer

    Print a footer at the bottom of the report indicating the date and time at which you printed the report and the database name, record name, version number, and page number. Deselected by default.

    Border

    Print a border or box around a record definition report. To print reports faster, clear this check box so that the printer can print the report in character mode, rather than in graphics mode. Deselected by default.

    Border Space(mm)

    Insert a set amount of space between a graphical boarder around the record definition report and the margins of the report. The default value is 3.

  3. Click OK when you are done, to close the Print Setup dialog box and save your settings.

  4. Select File > Print.

Record Definition Report

The following table lists the columns in the record definition report and their contents:

Column

Contents

Field Name

The name of the field.

Type

The field type.

Length

The length of the field (not specified for long character fields).

Format

The field format.

Long Name

The 30-character name of the field.

Short Name

The 15-character name of the field.

Key

Identifies key attributes (characters defined by position).

Req (required)

Yes indicates that the field is required.

TblEdt (table edit)

Prompt: Field values are edited against a specified prompt table.

Y/N: The field uses the Yes/No Table.

Xlat: The field has values in the translate table. Values (if printed) are listed below the field.

AU (auto-update)

Yes indicates that the auto-update option is enabled.

Dt (date)

Yes indicates that the reasonable date option is enabled.

PC (PeopleCode)

Yes indicates that the field contains PeopleCode. PeopleCode text (if printed) appears below the field.

Aud (audit)

Yes: The field audit flag is enabled.

A: Audit add.

C: Audit change.

D: Audit delete.

Prompt Table

The name of the prompt table.

Default Value

Any default value or constant.

You might also see these additional reference lines below each field or at the end of the report:

Reference

Description

SQL View

Shows the SQL view Select statement for view-type record definitions. This appears at the top of the report.

System Maintained

Indicates that the System Maintained check box is selected. Because this option is for documentation purposes only, it doesn’t warrant its own column heading.

DbField Help Context: nnn

Indicates that the field has been assigned a field help context number to link it to a help file that describes how the field is used wherever it appears in the database.

RecField Help Context: nnn

Indicates that the field has been assigned to a record field help context number to link it to a help file that describes how the field is used only as it appears in this record definition.

Audit Record

Identifies a user-defined audit record. Lists the audit record name and the type of audit.

Set Control Field

Identifies a set control field that is designated for the record definition.

Related Language Record

Identifies a related language record that is designated for the record definition.

Query Security Record

Identifies views that are used to restrict query access to data that is stored in the table.

Parent Record Name

Identifies the hierarchical relationship of the record for query reporting.

Printing records with subrecords takes into account whether the record view is expanded or collapsed. If the record view is expanded, the subrecord fields are indented to the appropriate level of nesting.

If you are creating a SQL view or dynamic view record definition, you must enter a SQL view Select statement to indicate which field values you want to join from which tables. The only difference between the standard view and dynamic view is that the dynamic view is not defined as a view to the database; it is stored on the client and run as a Select at runtime. Dynamic views avoid some constraints on views on some platforms.

Field or Control

Definition

Non-Standard SQL Table Name

Override the standard convention of prefixing each record name with PS_.

Build Sequence No (build sequence number)

Set the order in which the view is to be created. The default value is 1 when the record or view is initially created. Views that must be created first can be set to 0, while views that you want created last can be set to any number from 1 to 99. The build sequence number is stored with the other details of the record or view in the database.

Click to open SQL Editor

The view text is saved when the record is saved by selecting File > Save. The record must be saved first, before you open the SQL Editor.

As a general guideline, the SQL used for dynamic views should be as simple as possible because the runtime system appends WHERE clauses to the SQL definition to add key field lookup criteria and does not parse the dynamic view SQL definition to find correlation names. For example, we do not recommend the following format:

SELECT...FROM(SELECT * FROM...WHERE...)

Rather than having a WHERE clause in the subquery, one approach would be to create a static view that the dynamic view references. For example, that static view might be:

...
ABC_PRD_INS_VW as

SELECT B.SETID AS SETID 
 , A.BO_ID_CUST AS BO_ID_CUST 
 , A.INST_PROD_ID AS INST_PROD_ID 
 , B.PRODUCT_ID AS PRODUCT_ID 
 , B.DESCR AS DESCR 
 , A.SERIAL_ID AS SERIAL_ID 
 , A.INSTALLED_DATE AS INSTALLED_DATE 
  FROM PS_RF_INST_PROD A 
  , PS_PROD_ITEM B 
  , PS_RF_INST_PROD_ST C 
  , PS_PROD_PGRP_LNK D 
 WHERE A.SETID = B.SETID 
   AND A.PRODUCT_ID = B.PRODUCT_ID 
   AND A.SETID = C.SETID 
   AND A.INST_PROD_ID = C.INST_PROD_ID 
   AND C.INST_PROD_STATUS <> 'UNI' 
   AND A.SETID = D.SETID 
   AND A.PRODUCT_ID = D.PRODUCT_ID 
   AND D.PRODUCT_GROUP = '00'

Which is referenced by the dynamic view:

 SELECT SETID 
 ,BO_ID_CUST 
 ,INST_PROD_ID 
 ,PRODUCT_ID 
 ,DESCR 
 ,SERIAL_ID 
 ,INSTALLED_DATE 
  FROM PS_ABC_PRD_INS_VW 
 WHERE SETID = :1 
   AND BO_ID_CUST = :2 
   AND INST_PROD_ID = :3

Note: The order of the columns in the Select statement must be identical to the field order in the corresponding record definition. Also, only certain types of meta-SQL statements can be used in view text.

Note: Related language records should not use dynamic views but should be limited to physical views and records.