<?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 How to return the query ids from a featuretable to the function or code that requested it? in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-return-the-query-ids-from-a-featuretable-to/m-p/774685#M606</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;I'd be interested to know how others would approach this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say I want to query a feature table. The following code takes a query and fires a request to the featuretable which results in a list of queryIds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;myFeatureTable.queryIds(query)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the featuretable I then put some code within the &lt;SPAN style="color: #e23d39;"&gt;&lt;EM&gt;&lt;STRONG&gt;onQueryIdsStatusChanged&lt;/STRONG&gt; &lt;/EM&gt;&lt;/SPAN&gt;handler which does something with the list of Ids. All good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, what I really want is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;var listOfIds = myFeatureTable.queryIds(query);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason could be that maybe I want to fire off two different queries at the same time to the featuretable and work with both sets of results. Or perhaps I have a dozen places in my app that fire off requests and do different things with the results - how do I then return the list back to the function/code that called it in order to work with that list?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. this is what I would ideally want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;var listOfIds1 = myFeatureTable.queryIds(query1);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;var listOfIds2 = myFeatureTable.queryIds(query2);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;// do some stuff with the two lists....&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the question is: how to return the result back to the function that actually requested it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2015 12:41:02 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2015-09-03T12:41:02Z</dc:date>
    <item>
      <title>How to return the query ids from a featuretable to the function or code that requested it?</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-return-the-query-ids-from-a-featuretable-to/m-p/774685#M606</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;I'd be interested to know how others would approach this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say I want to query a feature table. The following code takes a query and fires a request to the featuretable which results in a list of queryIds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;myFeatureTable.queryIds(query)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the featuretable I then put some code within the &lt;SPAN style="color: #e23d39;"&gt;&lt;EM&gt;&lt;STRONG&gt;onQueryIdsStatusChanged&lt;/STRONG&gt; &lt;/EM&gt;&lt;/SPAN&gt;handler which does something with the list of Ids. All good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, what I really want is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;var listOfIds = myFeatureTable.queryIds(query);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason could be that maybe I want to fire off two different queries at the same time to the featuretable and work with both sets of results. Or perhaps I have a dozen places in my app that fire off requests and do different things with the results - how do I then return the list back to the function/code that called it in order to work with that list?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. this is what I would ideally want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;var listOfIds1 = myFeatureTable.queryIds(query1);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;var listOfIds2 = myFeatureTable.queryIds(query2);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;// do some stuff with the two lists....&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the question is: how to return the result back to the function that actually requested it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 12:41:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-return-the-query-ids-from-a-featuretable-to/m-p/774685#M606</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-09-03T12:41:02Z</dc:date>
    </item>
  </channel>
</rss>

