Defining Synchronization Properties for Individual Mobile Business Objects

Each mobile business object (MBO) that can be synchronized includes a Synchronization tab from which you configure synchronization behavior.

  1. From the Mobile Application Diagram, right-click the MBO for which you are configuring synchronization, and select Show Properties View.
    Note: MBOs that use an Online cache policy do not support synchronization.
  2. In the Properties view, select the Synchronization tab.
    Note: If you do not see the Synchronization tab, switch to the Advanced Developer profile.
  3. Complete the synchronization parameter configuration:
    Use the Add, Delete, and Delete All buttons to create or remove parameters. You can also supply additional parameter information for each parameter, including:
    • Parameter name – by default, each new parameter name is parameterN (N is the number of the parameter), which you can change.
    • Datatype – the datatype of the parameter. Datatypes in the Personalization key and Mapped-to columns must be compatible with the datatype selected here.
      Note: Synchronization parameters do not support structure types.
    • Nullable – accepts null as a valid value. Unselect this option if the argument to which this parameter is mapped does not support null as a valid value.
    • Personalization key – maps the synchronization parameter to a personalization-key value. If you specify a Personalization Key, the client is not required to provide a value, but must define a personalization value for the key before successfully using the MBO.
    • Default value – enter a valid value.
    • Mapped to – maps the synchronization parameter to an existing attribute. During synchronization, the application's synchronized local cache contains only entities that match the synchronization parameter value with that of the mapped attribute.
  4. Select Customized download data to generate the SQL statement that defines the synchronization filter. Unselecting this option clears the statement.
    By default, the internally generated SQL statement, based on the synchronization parameters, includes only the '=' operator. To properly generate the SQL for any MBO that is bound to a JDBC data source that includes a where clause operator other than '=' ( > , < , < > , != , > =, < =, ! > , ! <, and so on), update the generated SQL statement after selecting Customized download data. For example, change the '=' operator to '>'.
This example illustrates default synchronization behavior:
  1. Create an MBO with this SQL definition for a database MBO using the My Sample Database, which creates a load argument for state:
    select * from customer where state = :state
  2. Create a synchronization parameter and map the state load argument to this new synchronization parameter.
  3. The device application user enters CA and synchronizes the first time. The application displays all CA customers.
  4. The user then enters NY and synchronizes, which displays CA and NY customers.
Next
(Optional) For a parameter to serve as both a load argument and a synchronization parameter, select Synchronization parameter for the argument to which the synchronization parameter is mapped from the attribute's Load Arguments tab after you define the synchronization parameter.
Related concepts
Combining Load Arguments and Synchronization Parameters
Load Arguments