Jump to content

Sync Errors: Difference between revisions

From Resco's Wiki
Line 43: Line 43:
== Merge form in the app ==
== Merge form in the app ==


When app users encounter a conflict that they have to resolve in the app, a new home item, [[Conflict_resolution#Resolving_conflicts_on_the_client|Sync Errors]], appears at the very top of the list.
When the app encounters a conflict that users have to resolve in the app, a new home item, [[Conflict_resolution#Resolving_conflicts_on_the_client|Sync Errors]], appears at the very top of the list.


Select a record and tap '''Resolve'''. (Depending on your device and settings, [[View#Buttons|view buttons]] appear when you select a record or swipe from the right.)
Select a record and tap '''Resolve'''. (Depending on your device and settings, [[View#Buttons|view buttons]] appear when you select a record or swipe from the right.)

Revision as of 16:13, 16 June 2022

Warning Work in progress! We are in the process of updating the information on this page. Subject to change.

Merge config is an upcoming feature that allows you to configure the merge form used for resolving synchronization conflicts. For each field, you can set up how it should be handled when a conflict occurs.

To enable this advanced merge configuration, you have to set conflict resolution to Manual Action and upload a file with configuration details.

  1. Edit an app project and select Configuration from the Project menu.
  2. Click Merge Config to display the editor.
  3. Enter the configuration.
  4. Save all changes.

Sample configuration

#;account
address1_city;readonly;devicewins
address1_country;readonly;serverwins
address1_latitude;serverwins
address1_line1;serverwins
address1_line2;serverwins
address1_line3;serverwins
fax;hide;devicewins

Configuration details

Each line in the file corresponds to an entity name or field name.

  • Lines starting with #; define the entity.
  • Lines beneath an entity are the fields.
  1. Start with defining the entity for that you want to set up per-field merge configuration. Use the format #;entity_name, for example, #;contact.
  2. Next, list some or all fields. One field per line, in the format field_name;merge_behavior, for example, address1_city;devicewins
  3. Repeat steps 1 and 2 for all entities where you need to finetune merge behavior on field level.

The following conflict resolution behavior is supported:

  • serverwins: server version is selected by default, user can override this selection. For example: address1_country;serverwins
  • devicewins: device version is selected by default, user can override this selection. For example: address1_city;devicewins
  • (field not listed in the file): user can select the preferred version manually

Additionally, two flags control the behavior of the merge form:

  • hide: the field is not displayed on the merge form; the configured behavior applies automatically. For example: fax;hide;devicewins
  • readonly: the field is displayed on the form, but users cannot modify it; the configured behavior applies automatically. For example: phone;readonly;devicewins

Merge form in the app

When the app encounters a conflict that users have to resolve in the app, a new home item, Sync Errors, appears at the very top of the list.

Select a record and tap Resolve. (Depending on your device and settings, view buttons appear when you select a record or swipe from the right.)

The form shows all fields in conflict (with different values) with both server and local values. The app preselects the recommended value:

  • If a relevant Merge Config exists for this entity, preselect the configured value.
  • If a field was updated locally, preselect local value.
  • If none of the above applies, preselect server value.

You can override the default selection.

  • In each field line, tap the value that you prefer.
  • Alternatively, tap Server or Local in the top row to select all server or all local values.

Fields for which the value was updated locally since the last sync will be displayed with * before the display name of the field in the first column.

Tap Save to save the record to the local database. The sync conflict is resolved locally, and the new version will be updated to the server on the next sync.

In addition to the selectable fields, the merge form may list:

  • Automatically resolved fields: Two groups of fields are resolved automatically:
    • Fields without update permission
    • Fields with Merge Config flag "readonly".
  • System fields: Select system fields such as "modified on", "owner", and "status reason" are always visible at the bottom of the sync conflict merge form. The reason is to provide additional information about the respective updates on both local and server version.

Some fields are hidden:

  • All fields without a conflict.
  • All fields automatically resolved with the Merge Config flag "hide".