Wednesday, November 11, 2009

Creating Record Definitions

Viewing Record Definitions
You can see four views of the record by selecting View from the main toolbar: Field Display, Use Display, Edits Display, and PeopleCode Display.
  • Common Elements in all Display modes: Num, Field Name, and Type.
  • Field Display mode shows Basic Field Definitions: Len, Format, Short Name, and Long Name.
  • Use Display mode shows Key-Related Characteristics and Default Values: Key, Ordr
    (order), Dir(direction), CurC(currency control), Srch(search), List, Sys(system), Audt(audit), and Default
    .
  • Edits Display mode shows all Editing Options: Req(required), Edit, Prompt Table, Set Control Field, Rs Dt(reasonable date), and Event.
  • PeopleCode Display mode contains a column for each PeopleCode program type.
  • Note: You cannot add PeopleCode to a field until you save the record definition.

Naming Record Definitions
  • The name length can be up to 15 characters, with the exception of the Temporary Table type, which has a maximum length of 13.
  • The name must begin with a letter and can contain underscores to make it more readable.
  • Avoid special characters, such as # or $, which can cause problems in some database environments.
  • Record Naming Conventions: _TBL, _VW, _DVW, _WRK, _SBR, _QVW, _WL, R_, AUDIT_, WEBLIB_, FUNCLIB_, and DERIVED_
  • Select the Record Type tab to define the type of record definition: SQL Table, SQL View, Dynamic View, Derived/Work, SubRecord, Query View,  and Temporary Table.
  • Non Standard SQL Table Name is used to override the standard convention of prefixing PS_.
  • Keys for dynamic views should not be effective date fields.
Setting Record Properties

  •  Access the Record Properties, General tab to set General Properties: Description, Record Definition, Owner ID and Last Updated (Date/Time and By User).
  • Access the Record Properties, Use tab to set Use Properties: Set Control Field, Record Relationships (Parent Record, Related Language Record, Query Security Record, and Optimization Delete Record), and Record Audit (Record Name and Audit Options -Add/Change/Selective/Delete). 
  • Use tab, Record-Level Auto-Update Options (System ID Field and Timestamp Field)
  • Use tab, Record Information Options (Tools Table, Managed, and Upgrade Job Not Needed)
  • Note: The Append ALL (Dynamic Views) option applies to dynamic views. If it is set, at runtime the system appends the WHERE clause generated at runtime to all the SELECT statements in a dynamic view with a UNION.
          Also, if it is set, at runtime the system generates FILL as the table alias in the WHERE clause condition. For example, FILL. LIKE ’%O%’. You need to specify which table corresponds to the FILL in the dynamic view definition. For example, FROM tableA FILL. This is because the same record field name may exist in two different records.

Setting Record Field Properties  
  • Setting Record Field Use Properties: Key, Duplicate Order Key, Alternate Search Key, Descending Key, Search Key, Search Edit, List Box Item, From Search Field and Through Search Field, Default Search Field, Disable Advanced Search Options, Audit (Field Add/Field Change/Field Delete), System Maintained, Auto-Update, Record Field Label ID, Default Value (Constant or Record Name and Field Name), and Default Page Control.
  • Currency Control Field is available only for Number fields.
  • Time Zone (Specified Time Zone and Time Zone Control Field) is available only for DateTime and Time fields.
  • Note: System Maintained is for documentation purposes only and doesn’t affect processing.
  • Setting Record Field Edit Properties: Required, Edit Type (No Edit and Table Edit), Table Edit (Type, Prompt Table, and Set Control Field), and Reasonable Date.