laptop and a wrench

Bug

When using Update Layer Definition on a hosted feature layer view with a definition query (filter), the following error is returned, "Invalid definition for 'DefinitionQuery'. Invalid definition for System.String."

Last Published: April 23, 2022 ArcGIS Online
Bug ID Number BUG-000146872
SubmittedFebruary 15, 2022
Last ModifiedOctober 2, 2024
Applies toArcGIS Online
Version found9.4
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusWill Not Be Addressed

Additional Information

This is not a bug. When using updateDefinition, select the intended properties to modify, not the full service/layer JSON. Selecting the full service/layer JSON fails as it attempts to modify system level properties on the service that cannot be modified.

Workaround

  1. Remove the filter on the view.
  2. Update the layer definition and make the desired changes.
  3. Reapply the filter. Alternatively, users can keep the filter active, and instead remove it from the layer definition during updating. 

Steps to Reproduce

Bug ID: BUG-000146872

Software:

  • ArcGIS Online

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options