laptop and a wrench

Bug

Creating a hosted feature layer view using ArcGIS API for Python fails to create the expected visualization if the layer is set with a non-sequential layer ID in ArcGIS Pro.

ArcGIS API for Python
Bug ID Number BUG-000159162
SubmittedJune 16, 2023
Last ModifiedAugust 18, 2025
Applies toArcGIS API for Python
Version found2.1.1
Operating SystemWindows OS
Operating System Version11.0 64 bit
StatusAs Designed

Additional Information

To preserve the order, preserve_layer_ids must be set to True, and the layers/tables must be provided to the view. res2 = mgr.create_view( name=f"my_view_{uuid.uuid4().hex[:4]}", view_layers=[item.layers[3], item.layers[1]], preserve_layer_ids=True, ) This results in a layer with two layers in the view. The layer IDs are preserved as 83 and 1.

Workaround

  • Use the ArcGIS Online user interface (UI) to create the layer view.
  • Keep the default sequential layer IDs (0,1, 2, 3, and so forth).

Steps to Reproduce

Bug ID: BUG-000159162

Software:

  • ArcGIS API for Python

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