Sync compatibility notes

General

New clients need to check the new Sync capability to determine if a feature service has been configured to use sync.

NoteNote:

There is also a syncEnabled property, but it is recommended that new clients use the sync capability instead.

Older clients have no knowledge of this property; however, properties used by older clients are still supported. Thus, a client written for an older server will continue to work when the server is upgraded to the newest release.

Older clients check the supportsDisconnectedEditing property to determine if the service supports the API. If true, the clients then check properties of the layers to be used with Create Replica to ensure the following:

If supportsDisconnectedEditing is false, the service cannot take part in sync at all.

LayerQueries without queryOption

If a service does not have the syncEnabled property or has a value of false, the older syntax of layerQueries applies, as below.

Description

In addition to the layers and geometry parameters, the layerQueries parameter can be used to further define what is replicated. This parameter allows you to set properties on a per-layer or per-table basis. Only the properties for the layers and tables that you want change from the default are required. The properties include the following:

  • where—Defines an attribute query for a layer or table. The default is no where clause.
  • useGeometry—Determines whether or not to apply the geometry for the layer. The default is true. If set to false, features from the layer that intersect the geometry are not added.
  • includeRelated—Determines whether or not to add related rows. The default is true.

Syntax

layerQueries={ "<Layer_or_tableID1>" : {"where":"attribute_query", "useGeometry": <true | false>, "includeRelated" : <true | false>}, "<Layer_or_tableID2>: {.}}

Example

  • layerQueries={"1":{"useGeometry" : false}}
  • layerQueries={"0":{"where": "requires_inspection" = True}, "1":{"useGeometry " : false}}
  • layerQueries={"0":{"useGeometry" : false, "includeRelated" : false}}, "1":{"useGeometry" : false}}

7/5/2017