Previous Topic: Function Types, Message Types, and Function Fields

Next Topic: Null Update Suppression Logic

Database Function

CHGOBJ The Change Object (CHGOBJ) function defines a routine to update a record in a file. The CHGOBJ function includes the processing to check that the record exists before updating the database record.

There are no device files associated with the CHGOBJ function. However, it does have action diagram user points. This function must be attached to an update access path.

Note: For more information on PHY, see the section Internal Database Functions and PHY Access Paths.

The default CHGOBJ function is used to update all fields in the database record. If you want to change only a subset of the fields on the file, you must define a new CHGOBJ function specifying each field to be excluded as a Neither parameter or define a CHGOBJ based on a different access path containing only those fields.

A CHGOBJ function is provided for every database file and is based on the primary update access path. It is inserted in the Change DBF Record user point in edit functions that update changed records.

Note: When a CHGOBJ is inserted in the Change DBF Record user point, code is generated to check if the record was changed (by another user) before the record is updated. However, if a CHGOBJ is inserted in any other user point of any function type, this checking is not generated.

All fields on the access path must be provided as Neither, Input, or Both parameters and cannot be dropped.

The following table shows the parameters available.

Parameters

Usage

Role

Default

Option

All fields from access path

I

-

Y

R

Any other fields

Any

-

-

O

The following table shows the function options available.

Option

Default Value

Other Values

Null Update Suppression

M(YNLLUPD)

N, Y, A

Share Subroutine

M(YSHRSBR)

N, Y