<?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: Pull data (JavaScript) and Update Features in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-data-javascript-and-update-features/m-p/1168127#M42388</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/300487"&gt;@explocarto&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is possible to send an &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/apply-edits-feature-service-.htm" target="_self"&gt;applyEdits request&lt;/A&gt; to a feature service directly from a JavaScript function in Survey123. I would suggest using an application called &lt;A href="https://www.postman.com/downloads/" target="_self"&gt;Postman&lt;/A&gt;&amp;nbsp;which is an API development tool to narrow down the syntax needed in the applyEdits request, then translate that to your JavaScript function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the JavaScript sample we have in Connect we demonstrate a few ways to work with online API's. We don't explicitly demonstrate sending an applyEdits request, but using the samples available in Connect and the working request from Postman they can be merged. An important consideration is &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/pulldatajavascript.htm#ESRI_SECTION1_2A1B3F6B4F4741E9BC1BE519E671E565" target="_self"&gt;asynchronous calls&lt;/A&gt; are not supported in JavaScript functions so setting the async parameter in the &lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open" target="_self"&gt;open() method&lt;/A&gt; to False is needed.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2022 21:04:27 GMT</pubDate>
    <dc:creator>ZacharySutherby</dc:creator>
    <dc:date>2022-04-26T21:04:27Z</dc:date>
    <item>
      <title>Pull data (JavaScript) and Update Features</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-data-javascript-and-update-features/m-p/1155938#M41435</link>
      <description>&lt;P&gt;Context:&lt;BR /&gt;I'm looking to update an entity class with values from a table. The goal is to count the values from the table to perform a symbology on my entity class.&lt;/P&gt;&lt;P&gt;Because if I'm not mistaken, it's not possible with arcade.&lt;BR /&gt;Arcade would just allow me to count to show that total in the popup, but not to do any symbology.&lt;/P&gt;&lt;P&gt;Concrete case:&lt;BR /&gt;I'm working with a Survey123 Connect form&lt;/P&gt;&lt;P&gt;With Pulldata (JavaScript), I use a Query request which counts the number of elements on a considered set of my table.&lt;/P&gt;&lt;P&gt;On this same JavaScript file, is it possible to perform an Update Feature request to feed my entity class with the result of my previous Query?&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 23:27:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pull-data-javascript-and-update-features/m-p/1155938#M41435</guid>
      <dc:creator>explocarto</dc:creator>
      <dc:date>2022-03-21T23:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Pull data (JavaScript) and Update Features</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pull-data-javascript-and-update-features/m-p/1168127#M42388</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/300487"&gt;@explocarto&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is possible to send an &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/apply-edits-feature-service-.htm" target="_self"&gt;applyEdits request&lt;/A&gt; to a feature service directly from a JavaScript function in Survey123. I would suggest using an application called &lt;A href="https://www.postman.com/downloads/" target="_self"&gt;Postman&lt;/A&gt;&amp;nbsp;which is an API development tool to narrow down the syntax needed in the applyEdits request, then translate that to your JavaScript function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the JavaScript sample we have in Connect we demonstrate a few ways to work with online API's. We don't explicitly demonstrate sending an applyEdits request, but using the samples available in Connect and the working request from Postman they can be merged. An important consideration is &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/pulldatajavascript.htm#ESRI_SECTION1_2A1B3F6B4F4741E9BC1BE519E671E565" target="_self"&gt;asynchronous calls&lt;/A&gt; are not supported in JavaScript functions so setting the async parameter in the &lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open" target="_self"&gt;open() method&lt;/A&gt; to False is needed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 21:04:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pull-data-javascript-and-update-features/m-p/1168127#M42388</guid>
      <dc:creator>ZacharySutherby</dc:creator>
      <dc:date>2022-04-26T21:04:27Z</dc:date>
    </item>
  </channel>
</rss>

