States

States are called by Objects and are defined by Processes. The State record contains information about how a record looks and acts at a specific period in time.

A State record definition can include the following:

  • The State name.
  • The display screen to use in order to display the record or records.
  • The initialization process used when a list is first displayed.
  • The format to use to display the data.
  • The input condition to indicate whether or not a user can modify the record.
  • The Process to run when a user triggers a specific display option (Display Action).

The State record used depends on how many records the user views. There are out-of-box State records for searching for records, viewing a list, viewing a single record, and browsing a record.

Searching

When there are no records in the current file variable, it is assumed that the user is in “search” mode. The State that is used is the “Search State” defined in the table’s Object record. The default search state is “db.search”.

Record Lists

When viewing a list of records, the “List State” defined in the table’s Object record is used. The default list state is “db.list”.

Note In some earlier versions of Service Manager, record lists are referred to as QBE lists.

Viewing a single record

When viewing a single record, the record is first checked to see if it includes a “State” field in the dbdict. If the field exists and is populated, the contents of that field will be used as the current State of the record. If this field does not exist or is NULL, the “Default State” defined in the table’s Object record is used. The default value for the default state is “db.view”.

Browsing a record

When browsing a record in read-only mode, the “Browse State” defined in the table’s Object record is used. Note that only files that use locking need a browse State. Although viewing a record without having update rights looks similar to the browse screen, it is using the default State, not the browse State. There is no default browse state.

Integration tips for display application

If a display screen does not have any display events associated with it, the system automatically uses the se.default display event that performs se.lock.object in case of “OnFormModified”. If a display option record has the “Modifies Record” check box activated, the record is locked when the button is pressed.