Appendix: Working With Records Used in the Mobile Synchronization Framework

This appendix provides an overview of records used in the Mobile Synchronization Framework, discusses how to configure records for the Mobile Synchronization Framework, and provides an example.

Important! PeopleSoft Mobile Agent is a deprecated product. These features exist for backward compatibility only.

Click to jump to parent topicUnderstanding Mobile Synchronization Framework Records

Because of the architecture of the Mobile Synchronization Framework, you must consider additional settings when building applications that you intend to run on mobile or disconnected computers. These settings address updates to the application database that is running on the main network while mobile users have their computers in a disconnected state.

With the Mobile Synchronization Framework, the mobile user has a copy of the application tables running on their computers. If, for example, a system administrator adds a column to a table used in the mobile application, then the copy of this same table running on the disconnected computer is no longer current. When mobile users connect to the main network and attempt to synchronize the data on their machines with the data in the main application database, the synchronization operation will fail if the new column is a required (or 'NOT NULL') field because the application database expects a value to be inserted in the new column.

To ensure that the synchronization operation completes successfully, the system allows default values to be inserted in the new column.

Note. You can only specify default values in fields of the following types: Character, Number, and Signed Number.

Click to jump to parent topicConfiguring Records for the Mobile Synchronization Framework

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicSetting Record Properties

On the Use tab of the Record Properties dialog, a group box named Sync type (MSF) applies only to records used in mobile applications. The options in the Sync type (MSF) group box enable you to identify records as being used for mobile applications by selecting either of the options.

Server —> User (Down Sync)

Select this option if the data on the mobile computer needs to be updated with the data on the main application database server. Selecting this option does not affect any behavior of the build process, such as inserting default values for required fields.

 

User —> Server (Up Sync)

Select this option if the data on the main application database server needs to be updated by the data on the mobile computer.

If this option is selected and a Character, Number, or Signed Number column is set as required, during the build process the system automatically inserts the default values for these fields.

Also, if this option is selected the system does not allow you to set the following field types as required fields:

  • Long Character

  • Date

  • Time

  • Datetime

Note. You can select both options, depending on the application requirements.

See Also

Setting Record Properties

Click to jump to top of pageClick to jump to parent topicWorking with Required Fields and Default Values

This section discusses how to:

Creating a Required Field

As with any record definition, you specify that a field is required on the Record Field Properties - Edits tab. Selecting the Required check box specifies that a particular field is 'NOT NULL'.

The same is true for records used in mobile applications, except for records that have the User —> Server (Up Sync) option set. If set, you can only set Character, Number, and Signed Number fields to required. For all other field types, the system disables the Required check box.

Specifying Default Values for Required Fields

If the User –> Server (Up Sync) option is set in the record properties and the Required option is set in the record field properties, then during the build process the system inserts the following default values:

Field Type

Default Value

Character

'<space>'

Number

0 (zero)

Signed Number

0 (zero)

However, you can specify customer default values on the Use tab of the Record Field Properties dialog box. As with all other fields, you use the Default Value group box to specify custom options.

Click to jump to parent topicExample: Building Records for the Mobile Synchronization Framework

This example illustrates the SQL generated for the build scripts for records that meet the following criteria:

The following SQL examples create a table with four NOT NULL fields in the mobile record PS_MSF_DEMO. Two are Character fields (CUST_ID and AA_STATUS), one is a Number field (STD_HOURS), and one is a Signed Number field (QTY_ORDERED).

This sample SQL has no custom defaults specified on the Edits tab of the Record Field Properties dialog box:

CREATE TABLE PS_MSF_DEMO_1 (CUST_ID NCHAR(15) DEFAULT N' ' NOT NULL, STD_HOURS DECIMAL(6, 2) DEFAULT 0 NOT NULL, QTY_ORDERED DECIMAL(14, 4) DEFAULT 0 NOT NULL, ACTION_DT PSDATE NULL, PM_VALID_TO_TIME PSTIME NULL, APPROVEDTTM PSDATETIME NULL, AA_STATUS NCHAR(1) DEFAULT N' ' NOT NULL, QE_TEST_DESCR NTEXT NULL)

This sample SQL contains custom defaults that are specified on the Edits tab of the Record Field Properties dialog box. For STD_HOURS, the default is 8; for QTY_ORDERED, the default is 1; and for AA_STATUS, the default is A:

CREATE TABLE PS_MSF_DEMO_1 (CUST_ID NCHAR(15) DEFAULT N' ' NOT NULL, STD_HOURS DECIMAL(6, 2) DEFAULT 8 NOT NULL, QTY_ORDERED DECIMAL(14, 4) DEFAULT 1 NOT NULL, ACTION_DT PSDATE NULL, PM_VALID_TO_TIME PSTIME NULL, APPROVEDTTM PSDATETIME NULL, AA_STATUS NCHAR(1) DEFAULT N'A' NOT NULL, QE_TEST_DESCR NTEXT NULL)