<?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 can I access a relationship query through Attribute Inspector in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321872#M7667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The AttributeInspector only supports showing selected features from its associated FeatureLayers. You can create a FeatureLayer pointing to the url of the related table or layer and then call featureLayer.selectFeatures() on it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Aug 2010 19:00:27 GMT</pubDate>
    <dc:creator>DasaPaddock</dc:creator>
    <dc:date>2010-08-09T19:00:27Z</dc:date>
    <item>
      <title>How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321871#M7666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am extremely new to Flex and a relative novice to programming in general, but am making the migration from desktop to server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to access a relationship query through the Attribute Inspector.&amp;nbsp; I have used the Attribute Inspector example from the samples website and have added the datagrid and relationship query definition to it.&amp;nbsp; I have done this so that I can compare the values between the Attribute inspector and the datagrid(relationship query is working in the datagrid).&amp;nbsp; However I'm not sure how to pass the fields returned from the relationship query to the Attribute Inspector.&amp;nbsp; When passing them to the datagrid I use "relatedDatagrid.dataProvider = fset.attributes;" in which fset is the featureset returned from my defined relationship query, however this does not work for the Attribute Inspector.&amp;nbsp; Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can post the entire code or snippets of code upon request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or advice would be appreciated&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 16:20:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321871#M7666</guid>
      <dc:creator>CharlesHarris</dc:creator>
      <dc:date>2010-08-09T16:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321872#M7667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The AttributeInspector only supports showing selected features from its associated FeatureLayers. You can create a FeatureLayer pointing to the url of the related table or layer and then call featureLayer.selectFeatures() on it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Aug 2010 19:00:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321872#M7667</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-08-09T19:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321873#M7668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Dasa-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've gotten the Attribute Inspector to display the correct information however, I cannot edit it.&amp;nbsp; I'm guessing that this is because, the selection query is run on a feature layer of geometries and then the "key" is generated from the selected feature, once the "key" is generated it is used in a query on the table feature layer to select the related record in the table.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I use attrInsp_updateFeatureHandler function to update the that record in the table?&amp;nbsp; In the attrInsp_updateFeatureHandler function, when it uses "event.feature.attributes.OBJECTID", what feature is this refering to, is it the feature layer feature originally selected by the click?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've used "Alert.show(event.feature.attributes.OBJECTID)" to print this out to a window but it prints as "undefined".&amp;nbsp; If this were to return the proper OBJECTID, I could just change this to my "key" and run the same query as above to select the related record in the table and edit it, correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for the book, and thanks for any help...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 12:51:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321873#M7668</guid>
      <dc:creator>CharlesHarris</dc:creator>
      <dc:date>2010-08-11T12:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321874#M7669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not sure what the "key" is that you're referring to?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This sample may be helpful:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=AttributeInspectorInfoWindowEditable"&gt;http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=AttributeInspectorInfoWindowEditable&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice how the attrInsp_updateFeatureHandler function is calling applyEdits() on the featurelayer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 01:24:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321874#M7669</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-08-12T01:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321875#M7670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm not sure what the "key" is that you're referring to?&lt;BR /&gt;&lt;BR /&gt;This sample may be helpful:&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=AttributeInspectorInfoWindowEditable"&gt;http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=AttributeInspectorInfoWindowEditable&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Notice how the attrInsp_updateFeatureHandler function is calling applyEdits() on the featurelayer.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the 'key' is the attribute column which is used to relate both tables. The column which appears in both the table and the data being mapped.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 13:07:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321875#M7670</guid>
      <dc:creator>MLowry</dc:creator>
      <dc:date>2010-08-12T13:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321876#M7671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I think the 'key' is the attribute column which is used to relate both tables. The column which appears in both the table and the data being mapped.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That is correct.&amp;nbsp; They key is the Primary/Foreign key that links the two tables together, in this case "Handle" in the polygon feature class and "ehandle" in the related table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I do the initial "click" query it selects the polygon feature class and in the "selectionCompleteHandler" I run another query to select the value of the key field from the selected feature and then use that value to find the related record in the related table.&amp;nbsp; I then display the attribute information of that record in the Attribute Inspector.&amp;nbsp; Easy enough...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My delima comes in here, inside of the "updateFeatureHandler".&amp;nbsp; I'm trying to understand what "feature" the "event.feature..." syntax is referring to, is it the polygon feature that was selected upon clicking the canvas or is it the record in the related table?&amp;nbsp; I've tried to print "event.featureLayer.LayerDetails" to the screen so I can see what fields are in the layer of the selected feature in order to determine which one the code is attempting to update but it keeps returning "undefined".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope that helps...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 20:46:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321876#M7671</guid>
      <dc:creator>CharlesHarris</dc:creator>
      <dc:date>2010-08-12T20:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321877#M7672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try setting a breakpoint inside your "updateFeatureHandler" and then debug the app instead of trying to print the layerDetails. It's hard for me to tell without seeing the code, but the feature should be from the the layer that the FeatureLayer is pointing at.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Aug 2010 19:57:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321877#M7672</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-08-13T19:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321878#M7673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the help.&amp;nbsp; I have gotten this to work properly.&amp;nbsp; I needed to access "event.featureLayer.tableDetails" in the attrInsp_updateFeatureHandler function, which makes sense given that the feature is part of a feature layer that is a table in the database.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 15:08:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321878#M7673</guid>
      <dc:creator>CharlesHarris</dc:creator>
      <dc:date>2010-08-17T15:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321879#M7674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi jeremy, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would you mind posting the code you used to get the related results to work? I have spent quite a bit of time trying to figure this out with no luck yet.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Aug 2010 12:17:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321879#M7674</guid>
      <dc:creator>MLowry</dc:creator>
      <dc:date>2010-08-27T12:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access a relationship query through Attribute Inspector</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321880#M7675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mike-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a word doc with the code that I implemented to get this to work.&amp;nbsp; I basically changed the sample Attribute Inspector code to include a new query in the "selectionCompleteHandler" so that once a feature has been selected by clicking on the canvas a query is performed to select the related record in my table(This is why I grab "ehandle" from my feature layer and make it equal it to "Handle" in the table, they are the key fields).&amp;nbsp; In the "updateFeatureHandler" I used "tableDetails" instead of "layerDetails" to get the field and attribute information from the table to display it in the Attribute Inspector.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't forget that you have to create a "Feature Layer" with your table as the endpoint and specify the fields for use in the Attribute Inspector.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Aug 2010 15:42:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-can-i-access-a-relationship-query-through/m-p/321880#M7675</guid>
      <dc:creator>CharlesHarris</dc:creator>
      <dc:date>2010-08-27T15:42:05Z</dc:date>
    </item>
  </channel>
</rss>

