<?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 Python API - Smart Forms in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/python-api-smart-forms/m-p/1324915#M6926</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to se the ArcGIS API for Python to create a "FormCollection" from a webmap. The webmap contains several FieldMap smartforms and all I want is to create a form collection as per ESRI's documentation. I have written the following code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;wmItem = gis.content.get(itemID) # Fetch webmap item
wm = WebMap(wmItem) # Create wm object
fcoll = wm.forms&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error is on line 3: "&lt;SPAN class=""&gt;AttributeError&lt;/SPAN&gt;: 'PropertyMap' instance has no attribute 'layerType':&lt;/P&gt;&lt;P&gt;This webmap has several layer and tables with smartforms. I have also tried several other web maps and keep getting the same error.&lt;/P&gt;&lt;P&gt;Alternatively, this following code, straight from ESRI documentation gives the exact same error on the form_collection variable:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; &lt;SPAN class=""&gt;arcgis.mapping.forms&lt;/SPAN&gt; &lt;SPAN class=""&gt;import&lt;/SPAN&gt; &lt;SPAN class=""&gt;FormCollection&lt;/SPAN&gt;
&lt;SPAN class=""&gt;wm&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;arcgis&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;mapping&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;WebMap&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;item&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;form_collection&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;FormCollection&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;wm&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I would greatly appreciate any help.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2023 19:17:18 GMT</pubDate>
    <dc:creator>YS2388</dc:creator>
    <dc:date>2023-09-01T19:17:18Z</dc:date>
    <item>
      <title>Python API - Smart Forms</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/python-api-smart-forms/m-p/1324915#M6926</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to se the ArcGIS API for Python to create a "FormCollection" from a webmap. The webmap contains several FieldMap smartforms and all I want is to create a form collection as per ESRI's documentation. I have written the following code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;wmItem = gis.content.get(itemID) # Fetch webmap item
wm = WebMap(wmItem) # Create wm object
fcoll = wm.forms&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error is on line 3: "&lt;SPAN class=""&gt;AttributeError&lt;/SPAN&gt;: 'PropertyMap' instance has no attribute 'layerType':&lt;/P&gt;&lt;P&gt;This webmap has several layer and tables with smartforms. I have also tried several other web maps and keep getting the same error.&lt;/P&gt;&lt;P&gt;Alternatively, this following code, straight from ESRI documentation gives the exact same error on the form_collection variable:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; &lt;SPAN class=""&gt;arcgis.mapping.forms&lt;/SPAN&gt; &lt;SPAN class=""&gt;import&lt;/SPAN&gt; &lt;SPAN class=""&gt;FormCollection&lt;/SPAN&gt;
&lt;SPAN class=""&gt;wm&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;arcgis&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;mapping&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;WebMap&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;item&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;form_collection&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;FormCollection&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;wm&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I would greatly appreciate any help.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 19:17:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/python-api-smart-forms/m-p/1324915#M6926</guid>
      <dc:creator>YS2388</dc:creator>
      <dc:date>2023-09-01T19:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Python API - Smart Forms</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/python-api-smart-forms/m-p/1324944#M6928</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/689962"&gt;@YS2388&lt;/a&gt;&amp;nbsp;, after a quick test it looks like the ArcGIS API for Python has a bug when there are tables in a map and you try to access the FormCollection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on what you are looking to accomplish you can iterate through the layers and tables in the map and access the form.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;wmItem = gis.content.get(itemID) # Fetch webmap item
wm = WebMap(wmItem) # Create wm object

for layer in wm.layers:
    if 'formInfo' in layer:
        print(layer.formInfo)
        
for table in wm.tables:
    if 'formInfo' in table:
        print(table.formInfo) &lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 01 Sep 2023 20:28:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/python-api-smart-forms/m-p/1324944#M6928</guid>
      <dc:creator>JustinColville</dc:creator>
      <dc:date>2023-09-01T20:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python API - Smart Forms</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/python-api-smart-forms/m-p/1324951#M6929</link>
      <description>&lt;P&gt;Thanks for the reply Justin. It is helpful!&lt;/P&gt;&lt;P&gt;I would like to edit smartforms using the API and just could not figure out why I was getting the error. Is there a way to report this bug to ESRI?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 20:42:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/python-api-smart-forms/m-p/1324951#M6929</guid>
      <dc:creator>YS2388</dc:creator>
      <dc:date>2023-09-01T20:42:33Z</dc:date>
    </item>
  </channel>
</rss>

