<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic create_view Does Not Work with non-sequential Layer IDs in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/create-view-does-not-work-with-non-sequential/m-p/1487863#M10139</link>
    <description>&lt;P&gt;If the uniques in the layer of a service are not arranged from 0 to N, top to bottom, the result of 'create_view' will be unusable. I ran this code on a service with non-sequential ids:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;source_search = gis.content.search("test_20240608_unique_ids_assigned_all_around")[0]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;source_flc = FeatureLayerCollection.fromitem(source_search)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;new_view = source_flc.manager.create_view(name="unid_all_around_view")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Layer order in service:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RandyMcGregor1_0-1717938282729.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106546i09BD66DBB5F3ADB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RandyMcGregor1_0-1717938282729.png" alt="RandyMcGregor1_0-1717938282729.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Layer order in view created by above script:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RandyMcGregor1_1-1717938344630.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106547iB58E75EF6734937C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RandyMcGregor1_1-1717938344630.png" alt="RandyMcGregor1_1-1717938344630.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The view, when opened in the map viewer. The route, which is a line, has become a point layer. Activity 11016565550 GPXtoFeatures has become a line feature. A complete mess.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RandyMcGregor1_0-1717938863187.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106548iF3C4F9C28B60C9FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RandyMcGregor1_0-1717938863187.png" alt="RandyMcGregor1_0-1717938863187.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This only happens with 'create_view' in ArcGIS API for Python (in a notebook). If I make the view manually, this does not happen. create_view DOES work correctly when the order of layer ids in the service is 0,1,2... top-down. Has anyone else experienced this? Is it a bug? I have reproduced this on several platforms.&lt;STRONG&gt; ArcGIS API for Python cannot make a view from a service with non-sequential layer ids.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 09 Jun 2024 13:18:24 GMT</pubDate>
    <dc:creator>RandyMcGregor_Home</dc:creator>
    <dc:date>2024-06-09T13:18:24Z</dc:date>
    <item>
      <title>create_view Does Not Work with non-sequential Layer IDs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/create-view-does-not-work-with-non-sequential/m-p/1487863#M10139</link>
      <description>&lt;P&gt;If the uniques in the layer of a service are not arranged from 0 to N, top to bottom, the result of 'create_view' will be unusable. I ran this code on a service with non-sequential ids:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;source_search = gis.content.search("test_20240608_unique_ids_assigned_all_around")[0]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;source_flc = FeatureLayerCollection.fromitem(source_search)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;new_view = source_flc.manager.create_view(name="unid_all_around_view")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Layer order in service:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RandyMcGregor1_0-1717938282729.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106546i09BD66DBB5F3ADB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RandyMcGregor1_0-1717938282729.png" alt="RandyMcGregor1_0-1717938282729.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Layer order in view created by above script:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RandyMcGregor1_1-1717938344630.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106547iB58E75EF6734937C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RandyMcGregor1_1-1717938344630.png" alt="RandyMcGregor1_1-1717938344630.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The view, when opened in the map viewer. The route, which is a line, has become a point layer. Activity 11016565550 GPXtoFeatures has become a line feature. A complete mess.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RandyMcGregor1_0-1717938863187.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106548iF3C4F9C28B60C9FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RandyMcGregor1_0-1717938863187.png" alt="RandyMcGregor1_0-1717938863187.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This only happens with 'create_view' in ArcGIS API for Python (in a notebook). If I make the view manually, this does not happen. create_view DOES work correctly when the order of layer ids in the service is 0,1,2... top-down. Has anyone else experienced this? Is it a bug? I have reproduced this on several platforms.&lt;STRONG&gt; ArcGIS API for Python cannot make a view from a service with non-sequential layer ids.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 13:18:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/create-view-does-not-work-with-non-sequential/m-p/1487863#M10139</guid>
      <dc:creator>RandyMcGregor_Home</dc:creator>
      <dc:date>2024-06-09T13:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: create_view Does Not Work with non-sequential Layer IDs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/create-view-does-not-work-with-non-sequential/m-p/1487937#M10144</link>
      <description>&lt;P&gt;Looks like you have a reproducible case? If it's not working as expected with the latest version of the API, I'd say you should go ahead and log something here:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-python-api/issues" target="_blank"&gt;Issues · Esri/arcgis-python-api · GitHub&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 21:04:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/create-view-does-not-work-with-non-sequential/m-p/1487937#M10144</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2024-06-09T21:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: create_view Does Not Work with non-sequential Layer IDs</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/create-view-does-not-work-with-non-sequential/m-p/1487939#M10145</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Just did.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-python-api/issues/1841" target="_blank"&gt;https://github.com/Esri/arcgis-python-api/issues/1841&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2024 21:29:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/create-view-does-not-work-with-non-sequential/m-p/1487939#M10145</guid>
      <dc:creator>RandyMcGregor_Home</dc:creator>
      <dc:date>2024-06-09T21:29:36Z</dc:date>
    </item>
  </channel>
</rss>

