<?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: Javascript examples: working with a feature service...attributes in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1145345#M40624</link>
    <description>&lt;P&gt;Have a look at the ArcGIS Rest API documentation for &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer-.htm" target="_self"&gt;query&lt;/A&gt;, this also works for table layers. There are a couple of useful examples at the bottom of the page. Have a look at the outFields parameter as well to specify what attributes you need.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Feb 2022 20:32:24 GMT</pubDate>
    <dc:creator>HuubZwart</dc:creator>
    <dc:date>2022-02-17T20:32:24Z</dc:date>
    <item>
      <title>Javascript examples: working with a feature service...attributes</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1145326#M40623</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am attempting to use pulldata() with javascript to query a&amp;nbsp;&lt;EM&gt;nonspatial&lt;/EM&gt; hosted feature service item and query out an record (and associated attributes) based on an existing value of another data field on my Survey123 form. I've been looking at the Javascript Examples from the Survey123 Connect "samples" library. The example called "Working with a Feature Service" and the &lt;EM&gt;featureByLocation&lt;/EM&gt; script&amp;nbsp;gets me really close to what I need, but I don't need the location functions...just want to pull a record using another attribute (a simple WHERE clause).&lt;/P&gt;&lt;P&gt;Are there any examples of this exact use case someone could point me toward?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 19:54:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1145326#M40623</guid>
      <dc:creator>PaulPetersen1</dc:creator>
      <dc:date>2022-02-17T19:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript examples: working with a feature service...attributes</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1145345#M40624</link>
      <description>&lt;P&gt;Have a look at the ArcGIS Rest API documentation for &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer-.htm" target="_self"&gt;query&lt;/A&gt;, this also works for table layers. There are a couple of useful examples at the bottom of the page. Have a look at the outFields parameter as well to specify what attributes you need.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 20:32:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1145345#M40624</guid>
      <dc:creator>HuubZwart</dc:creator>
      <dc:date>2022-02-17T20:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript examples: working with a feature service...attributes</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1145487#M40633</link>
      <description>&lt;P&gt;See the getRecord JS file at: &lt;A href="https://github.com/IsmaelInRedlands/Survey123-Tricks-of-the-Trade" target="_blank"&gt;https://github.com/IsmaelInRedlands/Survey123-Tricks-of-the-Trade&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 05:29:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1145487#M40633</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2022-02-18T05:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript examples: working with a feature service...attributes</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1145741#M40650</link>
      <description>&lt;P&gt;Thank you Ismael, this puts me on the right track. I can get the getRecord JS working if I hard-code certain parts of it, but I'm having trouble with the "where" parameter. In particular, it's failing when I use the following:&lt;/P&gt;&lt;P&gt;pulldata("@javascript","QueryFeatureService.js","getRecord",${adminURL},&lt;STRONG&gt;"ISO_CODE='"+${adminISO}+"'"&lt;/STRONG&gt;,'NAME')&lt;/P&gt;&lt;P&gt;If I just hard-code it as:&lt;/P&gt;&lt;P&gt;pulldata("@javascript", "QueryFeatureService.js", "getRecord",${adminURL},&lt;STRONG&gt;"ISO_CODE='USCO'"&lt;/STRONG&gt;,'NAME')&lt;/P&gt;&lt;P&gt;...then it totally works fine. So I think I must have something simple messed up in my syntax for that parameter when I try to send an attribute. Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 19:12:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1145741#M40650</guid>
      <dc:creator>PaulPetersen1</dc:creator>
      <dc:date>2022-02-18T19:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript examples: working with a feature service...attributes</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1292261#M49465</link>
      <description>&lt;P&gt;I've been having the same issue.&amp;nbsp; Did you have any luck figuring this out?&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 19:16:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/javascript-examples-working-with-a-feature-service/m-p/1292261#M49465</guid>
      <dc:creator>BryanWright</dc:creator>
      <dc:date>2023-05-23T19:16:16Z</dc:date>
    </item>
  </channel>
</rss>

