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.

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:

  • All layers must have a GlobalID field.
  • All layers must have the same value for the syncCanReturnChanges property. Either all can return changes on sync (true ) or none can return changes on sync (false ). If all are false , replacement data is returned on sync.

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

Use dark colors for code blocksCopy
1
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}}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.