<?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 ad a coded value to Domain/Coded values in a hosted Feature Layer using REST API? in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-ad-a-coded-value-to-domain-coded-values-in/m-p/1397881#M4703</link>
    <description>&lt;P&gt;I have a hosted Feature Layer in AGOL with several coded values/domain values in some of the fields. I want to use REST API to add or remove a domain value from the layer.&lt;/P&gt;&lt;P&gt;I believe updateDefinition endpoint is the one I'm after as I've successfully updated the domains values with a payload like this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "fields": [
    {
      "name": "fieldName",
      "domain": {
        "type": "codedValue",
        "name": "domainName",
        "codedValues": [
          {
            "name": "Value 5",
            "code": "Value 5"
          }
        ]
      }
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So with the payload above, my updated list of coded values/domains is basically just [Value 5] as this will replace the whole domain list.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to 'append' coded value to the existing domain? My list of coded values looks like below and I just want to 'append' Value 5.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        "codedValues": [
          {
            "name": "Value 1",
            "code": "Value 1"
          }, 
          {
            "name": "Value 2",
            "code": "Value 2"
          },
          {
            "name": "Value 3",
            "code": "Value 3"
          },
          {
            "name": "Value 4",
            "code": "Value 4"
          }
        ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think that's possible, or am I missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2024 15:15:54 GMT</pubDate>
    <dc:creator>Woodpeckerus</dc:creator>
    <dc:date>2024-03-19T15:15:54Z</dc:date>
    <item>
      <title>How to ad a coded value to Domain/Coded values in a hosted Feature Layer using REST API?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-ad-a-coded-value-to-domain-coded-values-in/m-p/1397881#M4703</link>
      <description>&lt;P&gt;I have a hosted Feature Layer in AGOL with several coded values/domain values in some of the fields. I want to use REST API to add or remove a domain value from the layer.&lt;/P&gt;&lt;P&gt;I believe updateDefinition endpoint is the one I'm after as I've successfully updated the domains values with a payload like this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "fields": [
    {
      "name": "fieldName",
      "domain": {
        "type": "codedValue",
        "name": "domainName",
        "codedValues": [
          {
            "name": "Value 5",
            "code": "Value 5"
          }
        ]
      }
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So with the payload above, my updated list of coded values/domains is basically just [Value 5] as this will replace the whole domain list.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to 'append' coded value to the existing domain? My list of coded values looks like below and I just want to 'append' Value 5.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        "codedValues": [
          {
            "name": "Value 1",
            "code": "Value 1"
          }, 
          {
            "name": "Value 2",
            "code": "Value 2"
          },
          {
            "name": "Value 3",
            "code": "Value 3"
          },
          {
            "name": "Value 4",
            "code": "Value 4"
          }
        ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think that's possible, or am I missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 15:15:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-ad-a-coded-value-to-domain-coded-values-in/m-p/1397881#M4703</guid>
      <dc:creator>Woodpeckerus</dc:creator>
      <dc:date>2024-03-19T15:15:54Z</dc:date>
    </item>
  </channel>
</rss>

