Old Value Argument

Use the Old Value Argument field to map a mobile business object(MBO) parameter to a second (old) argument in update operations.

Use the Old value argument field to change an Update operation's parameter from its current value to a new value, while still allowing access to the parameter through the previously defined argument. For example, if you use the Update operation of an MBO to modify the lname parameter's argument from Jones to Smith, the Argument value is Smith, and if you choose to, you can map the Old value argument to Jones.

The old value is available from a drop down list, in the form old.argument_name (where argument_name is the name of the original argument, lname in the above example. The Un-map option unmaps the old value.

The Old value argument field is available from a number of Properties view locations, including:
Note: Although the parameter can be mapped to both Argument and Old value argument, when you select Show Figure, only the connection to the Argument displays.

Avoiding synchronization conflicts with the old value argument

If a mobile business object (MBO) performs an update operation, the device sends additional parameters to the server that contain the original values of the database columns mapped to the object's parameters. These original values are shared with the enterprise information system (EIS) server in specially-named arguments. That is, if an argument is named A, and if the original value is available, it is provided in the argument named old.A. By checking whether or not the original values has become stale, the EIS update operation can avoid conflicting updates.

Consider a database that contains table Person with three columns: socialsecurity_num (pk), fname, and lname. Then consider what happens in case of updates by different device applications.
  1. Two devices, D1 and D2, have downloaded a row 999-55-1212, 'Joe', 'User'.
  2. D1 updates the fname to 'Jane' and succeeds.
  3. D2 updates lname to "Yooser", and consequently supplies the original values 'Joe' and 'User'.

Because the current lname ('Jane') is not same as old.fname ('Joe') the update for D2 does not occur.

Related tasks
Creating Attributes for a Mobile Business Object
Creating Operations for a Mobile Business Object
Creating the Mobile Business Object using the Mobile Business Object Icon
Previewing Mobile Business Objects
Defining Synchronization Properties for Individual Mobile Business Objects
Adding a Load Parameter to a Mobile Business Object