<?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 Deleting relationships in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/deleting-relationships/m-p/70608#M1589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm wondering how to delete a relationship between two objects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Considering we have one Layer &lt;/SPAN&gt;&lt;STRONG&gt;parcel&lt;/STRONG&gt;&lt;SPAN&gt; and one Table &lt;/SPAN&gt;&lt;STRONG&gt;citizen/B] and a relationship such has one parcel is own by one citizen and a citizen can own many parcels.&lt;BR /&gt;&lt;BR /&gt;Here are is how the layer/table look like:&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;Parcel&lt;/B&gt;&lt;/STRONG&gt;&lt;B&gt;&lt;BR /&gt;&lt;SPAN&gt;ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OWNER_ID (= Citizen.ID)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Citizen&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Exemple :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Parcel&lt;/STRONG&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;BR /&gt;ID&amp;nbsp; OWNER_ID&lt;BR /&gt;1&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;2&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;3&amp;nbsp;&amp;nbsp; 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Citizen&lt;/STRONG&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;BR /&gt;ID&lt;BR /&gt;1&lt;BR /&gt;2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my code I get the relationships from parcel:&lt;/SPAN&gt;&lt;BR /&gt;&lt;/B&gt;&lt;PRE class="plain" name="code"&gt;&lt;B&gt;parcel.relationships[0]&lt;/B&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now if I want to remove the relationship between a parcel and its owner without knowing the schema how can I do that ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;relationship.keyField&lt;/SPAN&gt;&lt;SPAN&gt; will give me &lt;/SPAN&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;SPAN&gt; which is the key field in table &lt;/SPAN&gt;&lt;STRONG&gt;Citizen&lt;/STRONG&gt;&lt;SPAN&gt; but what about key fiekd &lt;/SPAN&gt;&lt;STRONG&gt;OWNER_ID&lt;/STRONG&gt;&lt;SPAN&gt; in layer &lt;/SPAN&gt;&lt;STRONG&gt;Parcel&lt;/STRONG&gt;&lt;SPAN&gt; ? This is this field I should set to &lt;/SPAN&gt;&lt;STRONG&gt;null&lt;/STRONG&gt;&lt;SPAN&gt; in order to remove the relationship.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Parcel&lt;/STRONG&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;BR /&gt;ID&amp;nbsp; OWNER_ID&lt;BR /&gt;1&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;2&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;3&amp;nbsp;&amp;nbsp; 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In other words my question could be: given a layer, how can I know which of his attributes is used in a relationship with another layer or table ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Mar 2014 13:45:46 GMT</pubDate>
    <dc:creator>MathieuVILLEMONT1</dc:creator>
    <dc:date>2014-03-10T13:45:46Z</dc:date>
    <item>
      <title>Deleting relationships</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/deleting-relationships/m-p/70608#M1589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm wondering how to delete a relationship between two objects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Considering we have one Layer &lt;/SPAN&gt;&lt;STRONG&gt;parcel&lt;/STRONG&gt;&lt;SPAN&gt; and one Table &lt;/SPAN&gt;&lt;STRONG&gt;citizen/B] and a relationship such has one parcel is own by one citizen and a citizen can own many parcels.&lt;BR /&gt;&lt;BR /&gt;Here are is how the layer/table look like:&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;Parcel&lt;/B&gt;&lt;/STRONG&gt;&lt;B&gt;&lt;BR /&gt;&lt;SPAN&gt;ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OWNER_ID (= Citizen.ID)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Citizen&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Exemple :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Parcel&lt;/STRONG&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;BR /&gt;ID&amp;nbsp; OWNER_ID&lt;BR /&gt;1&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;2&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;3&amp;nbsp;&amp;nbsp; 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Citizen&lt;/STRONG&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;BR /&gt;ID&lt;BR /&gt;1&lt;BR /&gt;2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my code I get the relationships from parcel:&lt;/SPAN&gt;&lt;BR /&gt;&lt;/B&gt;&lt;PRE class="plain" name="code"&gt;&lt;B&gt;parcel.relationships[0]&lt;/B&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now if I want to remove the relationship between a parcel and its owner without knowing the schema how can I do that ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;relationship.keyField&lt;/SPAN&gt;&lt;SPAN&gt; will give me &lt;/SPAN&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;SPAN&gt; which is the key field in table &lt;/SPAN&gt;&lt;STRONG&gt;Citizen&lt;/STRONG&gt;&lt;SPAN&gt; but what about key fiekd &lt;/SPAN&gt;&lt;STRONG&gt;OWNER_ID&lt;/STRONG&gt;&lt;SPAN&gt; in layer &lt;/SPAN&gt;&lt;STRONG&gt;Parcel&lt;/STRONG&gt;&lt;SPAN&gt; ? This is this field I should set to &lt;/SPAN&gt;&lt;STRONG&gt;null&lt;/STRONG&gt;&lt;SPAN&gt; in order to remove the relationship.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Parcel&lt;/STRONG&gt;&lt;SPAN style="font-family:Courier New;"&gt;&lt;BR /&gt;ID&amp;nbsp; OWNER_ID&lt;BR /&gt;1&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;2&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;3&amp;nbsp;&amp;nbsp; 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In other words my question could be: given a layer, how can I know which of his attributes is used in a relationship with another layer or table ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 13:45:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/deleting-relationships/m-p/70608#M1589</guid>
      <dc:creator>MathieuVILLEMONT1</dc:creator>
      <dc:date>2014-03-10T13:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting relationships</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/deleting-relationships/m-p/70609#M1590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mathieu,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; You need to use the APIs Relationship class: (I have always known the schema of the data I was using so I don't have any code examples for you).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;keyFieldInRelationshipTable&lt;/STRONG&gt;&lt;SPAN&gt; :The key field in attributed relationship class table that matches keyField. Returned only for attributed relationships. Requires ArcGIS 10.1 or later. &lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;keyField&lt;/STRONG&gt;&lt;SPAN&gt;: The relationship key field. Requires ArcGIS 10.1 or later. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See the Docs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/flex/api-reference/com/esri/ags/layers/supportClasses/Relationship.html"&gt;https://developers.arcgis.com/flex/api-reference/com/esri/ags/layers/supportClasses/Relationship.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 13:54:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/deleting-relationships/m-p/70609#M1590</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-03-10T13:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting relationships</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/deleting-relationships/m-p/70610#M1591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes and the relationship's &lt;/SPAN&gt;&lt;STRONG&gt;role&lt;/STRONG&gt;&lt;SPAN&gt; tells me if the layer is the origin or destination of the relationship.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 15:17:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/deleting-relationships/m-p/70610#M1591</guid>
      <dc:creator>MathieuVILLEMONT1</dc:creator>
      <dc:date>2014-03-12T15:17:20Z</dc:date>
    </item>
  </channel>
</rss>

