<?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 Reuse domain on different fields - AGOL in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/reuse-domain-on-different-fields-agol/m-p/1295424#M6627</link>
    <description>&lt;P&gt;Since ArcGIS OnLine doesn't allow for boolean fields, I'm creating a domain that will contain "Yes" or "No" (to be used in a form within Field Maps).&lt;/P&gt;&lt;P&gt;Is there any way to create one domain on AGOL and then reuse it (possibly by calling its name)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// first declare a domain
"fields": [
        {
          "name": "field",
          "type": "esriFieldTypeString",
          "alias": "field",
          "sqlType": "sqlTypeOther",
          "length": 3,
          "nullable": true,
          "editable": true,
          "domain": {
                "type": "codedValue",
                "name": "DomField",
                "mergePolicy": "esriMPTDefaultValue",
                "splitPolicy": "esriSPTDefaultValue",
                "codedValues": [
                    {"name": "Yes", "code": 1},
                    {"name": "No", "code": 0}
                ]               
            },
          "defaultValue": null
        }
]

// then reuse field when adding or updating layer definition and the field would inherit the domain values "Yes" and "No" and codes
"fields": [
        {
          "name": "field2",
          "domain": {
                "name": "DomField"
            }
        }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jun 2023 16:29:53 GMT</pubDate>
    <dc:creator>mikaël</dc:creator>
    <dc:date>2023-06-02T16:29:53Z</dc:date>
    <item>
      <title>Reuse domain on different fields - AGOL</title>
      <link>https://community.esri.com/t5/developers-questions/reuse-domain-on-different-fields-agol/m-p/1295424#M6627</link>
      <description>&lt;P&gt;Since ArcGIS OnLine doesn't allow for boolean fields, I'm creating a domain that will contain "Yes" or "No" (to be used in a form within Field Maps).&lt;/P&gt;&lt;P&gt;Is there any way to create one domain on AGOL and then reuse it (possibly by calling its name)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// first declare a domain
"fields": [
        {
          "name": "field",
          "type": "esriFieldTypeString",
          "alias": "field",
          "sqlType": "sqlTypeOther",
          "length": 3,
          "nullable": true,
          "editable": true,
          "domain": {
                "type": "codedValue",
                "name": "DomField",
                "mergePolicy": "esriMPTDefaultValue",
                "splitPolicy": "esriSPTDefaultValue",
                "codedValues": [
                    {"name": "Yes", "code": 1},
                    {"name": "No", "code": 0}
                ]               
            },
          "defaultValue": null
        }
]

// then reuse field when adding or updating layer definition and the field would inherit the domain values "Yes" and "No" and codes
"fields": [
        {
          "name": "field2",
          "domain": {
                "name": "DomField"
            }
        }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 16:29:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/reuse-domain-on-different-fields-agol/m-p/1295424#M6627</guid>
      <dc:creator>mikaël</dc:creator>
      <dc:date>2023-06-02T16:29:53Z</dc:date>
    </item>
  </channel>
</rss>

