<?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: How to handle query results from multiple fields in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648483#M60451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can retrieve values from a known field a couple different ways...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0080ff; font-family: Menlo, monospace; font-size: 11px;"&gt;attributes.FIELDNAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0080ff; font-size: 11px; font-family: Menlo, monospace;"&gt;attributes["FIELDNAME"]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the second syntax would be better for you if you want to substitute a variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jul 2014 16:17:20 GMT</pubDate>
    <dc:creator>JohnGravois</dc:creator>
    <dc:date>2014-07-10T16:17:20Z</dc:date>
    <item>
      <title>How to handle query results from multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648479#M60447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With thanks to John Gravois, I've been able to pass geometry from the result of a geocoder, along with a field name, to a spatial intersection query to run against a school boundary layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'd like to do is pull the school boundary number from the corresponding field the user chooses - that is - the user chooses Grade 6 from the drop down, which means I want the value from the SCHOOL_6 field in the boundary layer I'm querying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm wondering how I should do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Do I use the SCHOOL_6 value in the outfields query parameter and pull that value, which yields this result:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="1741" alt="singleFieldResult.PNG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/1741_singleFieldResult.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;additionally - how do I pull that value &lt;STRONG&gt;416&lt;/STRONG&gt; if there is only ever 1 feature returned, but the field name could always change based on the drop-down?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;or ...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Pull all the fields from the query layer, and select the attribute from the field that matches the value of the drop-down (ie. SCHOOL_6), and sift through the results that way. Here's what the results look like from pulling all the fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="1742" alt="multipleFieldResults.PNG" class="jive-image image-2" src="https://community.esri.com/legacyfs/online/1742_multipleFieldResults.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;@&lt;/P&gt;&lt;P&gt;The purpose of pulling this boundary number is that it will go into the last query, which will pull all the schools belonging to that boundary number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE: I have added the code I am working on. cc &lt;A href="https://community.esri.com/migrated-users/8586"&gt;Jake Skinner&lt;/A&gt;‌&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Matthew Baker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 22:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648479#M60447</guid>
      <dc:creator>MatthewBaker2</dc:creator>
      <dc:date>2014-07-09T22:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle query results from multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648480#M60448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may be helpful to post the code you are working with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 12:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648480#M60448</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-07-10T12:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle query results from multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648481#M60449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/8586"&gt;Jake Skinner&lt;/A&gt;‌, added the code I'm working with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 15:22:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648481#M60449</guid>
      <dc:creator>MatthewBaker2</dc:creator>
      <dc:date>2014-07-10T15:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle query results from multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648482#M60450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;qt.execute(queryBounds, function(results) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var resultBound;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resultBound = &lt;STRONG&gt;results.features[0].attributes;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(resultBound);&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 15:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648482#M60450</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-07-10T15:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle query results from multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648483#M60451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can retrieve values from a known field a couple different ways...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0080ff; font-family: Menlo, monospace; font-size: 11px;"&gt;attributes.FIELDNAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0080ff; font-size: 11px; font-family: Menlo, monospace;"&gt;attributes["FIELDNAME"]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the second syntax would be better for you if you want to substitute a variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 16:17:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648483#M60451</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2014-07-10T16:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle query results from multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648484#M60452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/2203"&gt;JGravois-esristaff&lt;/A&gt;‌ perfecto! That works great and will let me do exactly what I need - substitute the variable from the drop-down to the result specific to the corresponding field... great stuff!!! Many thanks to both of you! cc &lt;A href="https://community.esri.com/migrated-users/8586"&gt;jskinner-esristaff&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 16:47:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648484#M60452</guid>
      <dc:creator>MatthewBaker2</dc:creator>
      <dc:date>2014-07-10T16:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle query results from multiple fields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648485#M60453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anytime amigo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 16:49:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-handle-query-results-from-multiple-fields/m-p/648485#M60453</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2014-07-10T16:49:00Z</dc:date>
    </item>
  </channel>
</rss>

