<?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: Query a layer based on a relationship in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-a-layer-based-on-a-relationship/m-p/373494#M8719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In case if anyone is wondering, we are still accepting answers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jan 2014 23:57:59 GMT</pubDate>
    <dc:creator>raffia</dc:creator>
    <dc:date>2014-01-10T23:57:59Z</dc:date>
    <item>
      <title>Query a layer based on a relationship</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-a-layer-based-on-a-relationship/m-p/373493#M8718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all, Happy New Year. I hope I caught everyone in the best of moods.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So we have created a new advanced DB with relationships. We have a landmarks point layer (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/EGIPA_NewCairo/MapServer/2" rel="nofollow" target="_blank"&gt;http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/EGIPA_NewCairo/MapServer/2&lt;/A&gt;&lt;SPAN&gt;), and a LandmarkTypes (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/EGIPA_NewCairo/MapServer/17" rel="nofollow" target="_blank"&gt;http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/EGIPA_NewCairo/MapServer/17&lt;/A&gt;&lt;SPAN&gt;) table that defines the types, and both are connected with this table (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/EGIPA_NewCairo/MapServer/22" rel="nofollow" target="_blank"&gt;http://arcgis4.roktech.net/arcgis/rest/services/DigitalEgypt/EGIPA_NewCairo/MapServer/22&lt;/A&gt;&lt;SPAN&gt;). What I am trying to do is a query to return all landmarks that are of a specific type (LandmarkTypes_ID=106). Each landmark has a couple of more relationships, if just one of those can return with the query results, would be a fantastic start for 2014 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I looked at the samples available, the ones about the relationship don't do what we are trying to do. Is there maybe a sample somewhere that will illustrate this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 07:28:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-a-layer-based-on-a-relationship/m-p/373493#M8718</guid>
      <dc:creator>raffia</dc:creator>
      <dc:date>2013-12-31T07:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Query a layer based on a relationship</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-a-layer-based-on-a-relationship/m-p/373494#M8719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In case if anyone is wondering, we are still accepting answers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 23:57:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-a-layer-based-on-a-relationship/m-p/373494#M8719</guid>
      <dc:creator>raffia</dc:creator>
      <dc:date>2014-01-10T23:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Query a layer based on a relationship</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-a-layer-based-on-a-relationship/m-p/373495#M8720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have your tried looking at the queryRelatedFeatures function within the featurelayer or the RelationshipQuery?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/flex/api-reference/index.html?com/esri/ags/layers/FeatureLayer.html&amp;amp;com/esri/ags/layers/class-list.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/en/flex/api-reference/index.html?com/esri/ags/layers/FeatureLayer.html&amp;amp;com/esri/ags/layers/class-list.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/tasks/supportClasses/RelationshipQuery.html" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/en/flex/api-reference/com/esri/ags/tasks/supportClasses/RelationshipQuery.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The most helpful to me was to use the code from the Multiple related records example for relationship query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/flex/sample-code/multiple-related-records.htm" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/en/flex/sample-code/multiple-related-records.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look at how the relationship query is in the declarations and read more about it in the API reference to limit the fields etc.&amp;nbsp; The fieldsLayer_selectionCompleteHandler function has all of the code you will need to perform the relationship query, you will have to modify it to your layers and fields.&amp;nbsp; It provides the code for doing the quesry and creating the onResult and onFault coding.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise you could run a query on the related table and create an array of the selected feature id's and then use that to select the features within your landmark layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 13:51:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-a-layer-based-on-a-relationship/m-p/373495#M8720</guid>
      <dc:creator>MikeDahm</dc:creator>
      <dc:date>2014-01-13T13:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Query a layer based on a relationship</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-a-layer-based-on-a-relationship/m-p/373496#M8721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Mike, using those links and a post in the forums I figured it all out. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Raffi&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 09:30:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-a-layer-based-on-a-relationship/m-p/373496#M8721</guid>
      <dc:creator>raffia</dc:creator>
      <dc:date>2014-01-14T09:30:30Z</dc:date>
    </item>
  </channel>
</rss>

