<?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: Deleting Relationship Class from Featue Service in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/deleting-relationship-class-from-featue-service/m-p/1719336#M69445</link>
    <description>&lt;P&gt;This is not possible when views exist&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":crying_face:"&gt;😢&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Aug 2026 18:45:48 GMT</pubDate>
    <dc:creator>Teresa_Blader</dc:creator>
    <dc:date>2026-08-07T18:45:48Z</dc:date>
    <item>
      <title>Deleting Relationship Class from Featue Service</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/deleting-relationship-class-from-featue-service/m-p/1223738#M48430</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;how can I delete a relationship class from a Feature Service?&lt;/P&gt;&lt;P&gt;Can someone help?&lt;/P&gt;&lt;P&gt;Thanks Marco&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 10:24:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/deleting-relationship-class-from-featue-service/m-p/1223738#M48430</guid>
      <dc:creator>MarcoPoetsch</dc:creator>
      <dc:date>2022-10-20T10:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Relationship Class from Featue Service</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/deleting-relationship-class-from-featue-service/m-p/1223749#M48432</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/143552"&gt;@MarcoPoetsch&lt;/a&gt;&lt;/P&gt;&lt;P&gt;See below for feature layer, you can alter for a table using item.tables instead.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Run first above the ######## line to see the names of the relationships and identify the one you want to delete. Then add in the part below the ####### and add in the relationship name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis import GIS

agol = GIS("home")

## get the feature service using the item id
item = agol.content.get("FS_ITEM_ID")

## get the Feature Layer and its ID
## you might need to replace 0 with the proper layer index if more than one layer
lyr = item.layers[0]

## print to see the relationship details, take note of the name you want to delete
print(lyr.properties.relationships)

################################################################################
## Then run the script adding in the RELATIONSHIP_NAME  below

## for each relationship
for rel in lyr.properties.relationships:
    ## if it has the name we are interested in
    if rel["name"] == "RELATIONSHIP_NAME":
        print(rel["name"])
        ## get details of relationship
        remove = dict(rel)
        ## and delete
        lyr.manager.delete_from_definition({"relationships" : [remove]})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 11:31:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/deleting-relationship-class-from-featue-service/m-p/1223749#M48432</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2022-10-20T11:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Relationship Class from Featue Service</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/deleting-relationship-class-from-featue-service/m-p/1719336#M69445</link>
      <description>&lt;P&gt;This is not possible when views exist&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":crying_face:"&gt;😢&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2026 18:45:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/deleting-relationship-class-from-featue-service/m-p/1719336#M69445</guid>
      <dc:creator>Teresa_Blader</dc:creator>
      <dc:date>2026-08-07T18:45:48Z</dc:date>
    </item>
  </channel>
</rss>

