<?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 Re: item.update() is breaking WAB apps in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/item-update-is-breaking-wab-apps/m-p/856623#M4028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Angus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exactly what are you trying to update in the app? URLs defined in widgets (e.g., Geoprocessing Widget task URL)? Those would appear in the Web Application item data, otherwise any displayed layers should come from the underlying Web Map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Earl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Oct 2019 03:39:51 GMT</pubDate>
    <dc:creator>EarlMedina</dc:creator>
    <dc:date>2019-10-02T03:39:51Z</dc:date>
    <item>
      <title>item.update() is breaking WAB apps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/item-update-is-breaking-wab-apps/m-p/856622#M4027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Morning,&lt;/P&gt;&lt;P&gt;I am trying to create a script that searches an items dependencies &amp;amp; data, finds legacy URL's/services and updates these to the new version of that URL/service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example of script&lt;/P&gt;&lt;P&gt;&lt;EM&gt;orig_data = item.getdata()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;new_data = orig_data.replace(old_url, new_url)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;item.update(item_properties=None, data=new_data, thumbnail=None, metadata=None)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The outcome of this script, when used with WAB Apps, is the app breaking and returning an error page of "'False' is undefined". What is wrong with the above methodology for WAB Apps? Is there an alternative workflow to achieve the same end goal of updating legacy dependencies that are baked into a WAB App?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2019 02:47:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/item-update-is-breaking-wab-apps/m-p/856622#M4027</guid>
      <dc:creator>AngusHooper1</dc:creator>
      <dc:date>2019-10-02T02:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: item.update() is breaking WAB apps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/item-update-is-breaking-wab-apps/m-p/856623#M4028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Angus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exactly what are you trying to update in the app? URLs defined in widgets (e.g., Geoprocessing Widget task URL)? Those would appear in the Web Application item data, otherwise any displayed layers should come from the underlying Web Map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Earl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2019 03:39:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/item-update-is-breaking-wab-apps/m-p/856623#M4028</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2019-10-02T03:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: item.update() is breaking WAB apps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/item-update-is-breaking-wab-apps/m-p/856624#M4029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The geometry service that the Portal is configured to use is baked into the WAB app data. This is not configurable in the app, a widget or web map.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2019 04:04:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/item-update-is-breaking-wab-apps/m-p/856624#M4029</guid>
      <dc:creator>AngusHooper1</dc:creator>
      <dc:date>2019-10-02T04:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: item.update() is breaking WAB apps</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/item-update-is-breaking-wab-apps/m-p/856625#M4030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, if that is what you're trying to update the workflow you described isn't quite what I had in mind. What happens if instead you do:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;app_data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getdata&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
app_data&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'geometryService'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'https://thisisanupdate.com'&lt;/SPAN&gt;
item_properties &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"text"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; json&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dumps&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;app_data&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
app&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;update&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item_properties&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;item_properties&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This update is successful for me and the application continues to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:35:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/item-update-is-breaking-wab-apps/m-p/856625#M4030</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2021-12-12T10:35:32Z</dc:date>
    </item>
  </channel>
</rss>

