<?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 get the description value of a field that has a domain? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447942#M35132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, so I think I'm just about there now...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason the DomainToTable function is not liking the input I am giving it. I find the domain name the way you suggested, csny490, and stick that into the function with the rest of my parameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
#workspace is a parameter taken as input on the tool (example.gdb would be the workspace, for example)
#domain is a field.domain value: fields are listed using arcpy.ListFields(aFeatureClass) function, iterated through to find the correct field and then that field's domain is placed into a variable called "domain"
#the last 3 inputs are made up names for the table, code and description values respectively

arcpy.DomainToTable_management(workspace, domain, "ExampleTable", "code", "description")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It errors out with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "...\arcpy\management.py", line...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (DomainToTable).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 20:01:05 GMT</pubDate>
    <dc:creator>DominickAlfonso</dc:creator>
    <dc:date>2021-12-11T20:01:05Z</dc:date>
    <item>
      <title>How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447937#M35127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, this is my first time posting on these forums so I apologize if I am doing something wrong beforehand!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to find a way to get a value from a field &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;that has a domain&lt;/SPAN&gt;&lt;SPAN&gt;. I noticed that getting a value using the normal approach only gives me the coded value of the field, but not the description value. Is there any way to retrieve the description? The coded value is not needed for what I am trying to accomplish. Here is the function I am using this in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
def getValues(featureClass,FieldName):
&amp;nbsp;&amp;nbsp;&amp;nbsp; desc = arcpy.Describe(featureClass)
&amp;nbsp;&amp;nbsp;&amp;nbsp; cur = arcpy.SearchCursor(featureClass)
&amp;nbsp;&amp;nbsp;&amp;nbsp; row = cur.next()
&amp;nbsp;&amp;nbsp;&amp;nbsp; names = []
&amp;nbsp;&amp;nbsp;&amp;nbsp; while row:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name = str(row.getValue(FieldName)) #would like to get description and not code value on this line...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ind = names.index(name)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; names.append(name)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = cur.next()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; return(names)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 20:06:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447937#M35127</guid>
      <dc:creator>DominickAlfonso</dc:creator>
      <dc:date>2012-01-27T20:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447938#M35128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You would have to export the domain to a table 1st and use it as a look up table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Domain To Table tool: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000022000000"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000022000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd recomend loading the domain table into a python dictionary and using like in this example: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/9555-Modifying-Permanent-Sort-script-by-Chris-Snyder?p=30010&amp;amp;viewfull=1#post30010"&gt;http://forums.arcgis.com/threads/9555-Modifying-Permanent-Sort-script-by-Chris-Snyder?p=30010&amp;amp;viewfull=1#post30010&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 20:20:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447938#M35128</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2012-01-27T20:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447939#M35129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This probably does not help you right now but with version 10.1 of ArcGIS there will be an arcpy.da.listdomains function that will return domain objects with the properties you are looking for.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 16:41:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447939#M35129</guid>
      <dc:creator>RussellBrennan</dc:creator>
      <dc:date>2012-01-30T16:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447940#M35130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, csny490, that actually helped me get started with what I need to accomplish... Is there a built-in function that will help me in finding the domain name of a field using the field's name so that I can use the domain name in the DomainToTable function?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, russellb, I will definitely keep that in mind! That's good to know info for a future update down the road. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 20:27:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447940#M35130</guid>
      <dc:creator>DominickAlfonso</dc:creator>
      <dc:date>2012-01-30T20:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447941#M35131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is there a built-in function that will help me in finding the domain name of a field using the field's name so that I can use the domain name in the DomainToTable function?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes there is. I've never done anything with it, but it'd look something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fieldList = arcpy.ListFields(myFC)
for field in fieldList:
&amp;nbsp;&amp;nbsp; print field.name + " - " + str(field.domain)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:01:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447941#M35131</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T20:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447942#M35132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, so I think I'm just about there now...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason the DomainToTable function is not liking the input I am giving it. I find the domain name the way you suggested, csny490, and stick that into the function with the rest of my parameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
#workspace is a parameter taken as input on the tool (example.gdb would be the workspace, for example)
#domain is a field.domain value: fields are listed using arcpy.ListFields(aFeatureClass) function, iterated through to find the correct field and then that field's domain is placed into a variable called "domain"
#the last 3 inputs are made up names for the table, code and description values respectively

arcpy.DomainToTable_management(workspace, domain, "ExampleTable", "code", "description")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It errors out with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "...\arcpy\management.py", line...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (DomainToTable).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:01:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447942#M35132</guid>
      <dc:creator>DominickAlfonso</dc:creator>
      <dc:date>2021-12-11T20:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447943#M35133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For the "workspace" variable, make sure you are specify the entire path. For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;workspace = r"C:\temp\test.gdb"
myFC = workspace + "\\my_fc"
domainList = []
fieldList = arcpy.ListFields(myFC)
for field in fieldList:
&amp;nbsp;&amp;nbsp; if field.domain != '' and field.domain not in domainList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domainList.append(field.domain)
for domain in domainList:
&amp;nbsp;&amp;nbsp; domainTable = workspace + "\\domain_table_for_" + domain.replace(" ", "_") #replace any blanks with an underscore
&amp;nbsp;&amp;nbsp; arcpy.DomainToTable_management(workspace, domain, domainTable, "code", "description") #assuming cosde and description are the names&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to export all the domains in a workspace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;workspace = r"C:\temp\test.gdb"
dsc = arcpy.Describe(workspace)
for domain in dsc.domains:
&amp;nbsp;&amp;nbsp; domainTable = workspace + "\\domain_table_for_" + domain.replace(" ", "_") #replace any blanks with an underscore
&amp;nbsp;&amp;nbsp; arcpy.DomainToTable_management(workspace, domain, domainTable, "code", "description") #assuming cosde and description are the name&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:01:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447943#M35133</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T20:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447944#M35134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh, I see now! My issue was with the name of the table itself in the parameters to the function... I did not think that I would need to include the workspace it had to be placed inside, I just assumed it would know this from the workspace parameter. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all your help!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 21:51:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447944#M35134</guid>
      <dc:creator>DominickAlfonso</dc:creator>
      <dc:date>2012-01-30T21:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447945#M35135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I did not think that I would need to include the workspace it had to be placed inside&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You actually don't if you 1st set the workspace using this comand.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.env.workspace = r"C:\temp\test.gdb"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So this "should" work I think:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;myWorkspace = r"C:\temp\test.gdb"
arcpy.env.workspace = myWorskpace
dsc = arcpy.Describe(arcpy.env.workspace)
for domain in dsc.domains:
&amp;nbsp;&amp;nbsp; domainTable = "domain_table_for_" + domain.replace(" ", "_") #replace any blanks with an underscore NOTE I ONLY INCLUDE THE TABLE NAME HERE, SINCE I ALREADY SET THE WORSKPACE
&amp;nbsp;&amp;nbsp; arcpy.DomainToTable_management(workspace, domain, domainTable, "code", "description") #assuming cosde and description are the name &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I generally don't set the workspace like that, and instead rely on proving the full paths to any input/output data files. Setting the workspace tends to be a tiny bit slower (takes &amp;gt; 0 second o set it) and it gets somewhat confusing when you are reading/writting data to many different workspaces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only time I set the workspace is when I have to, for example when listing the featureclasses within a .gdb&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.env.workspace = r"C:\temp\test.gdb"
fcList = arcpy.ListFeatureClasses()
for fc in fcList:
&amp;nbsp;&amp;nbsp; print fc&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:01:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447945#M35135</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T20:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447946#M35136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am working with multiple workspaces which is why I needed to specify the full path, exactly as you say! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After successfully running the DomainToTable function, I am having trouble reading the values (description values) from the table itself. Shouldn't I just be able to do this by using a cursor just like when trying to access data in a feature class, etc? Or would this be different because of the structure of the table object? I want to try and create a python dict from the values in the table (linking "code" fields to their respective "description" fields so that I can reference them in another area of the script).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your help is much appreciated!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 15:28:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447946#M35136</guid>
      <dc:creator>DominickAlfonso</dc:creator>
      <dc:date>2012-01-31T15:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the description value of a field that has a domain?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447947#M35137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It might look something like this then...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;workspace = r"C:\temp\test.gdb"
myFC = workspace + "\\my_fc"
domainList = []
fieldList = arcpy.ListFields(myFC)
for field in fieldList:
&amp;nbsp;&amp;nbsp; if field.domain != '' and field.domain not in domainList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domainList.append(field.domain)
domainDict = {}
for domain in domainList:
&amp;nbsp;&amp;nbsp; domainTable = workspace + "\\domain_table_for_" + domain.replace(" ", "_") #replace any blanks with an underscore
&amp;nbsp;&amp;nbsp; arcpy.DomainToTable_management(workspace, domain, domainTable, "CODE", "DESCRIPTION") #assuming code and description are the names
&amp;nbsp;&amp;nbsp; searchRows = arcpy.SerachCursor(domainTable)
&amp;nbsp;&amp;nbsp; for row in searchRow:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domainDict[domain, searchRow.CODE] = searchRow.DESCRIPTION
&amp;nbsp;&amp;nbsp; del searchRow, searchRows&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then to rerieve the descriptions from the domainDict, the key is domain name and code value. For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; print domainDict["BOAT_TYPE", 3] #access CODE = 3 from the 'BOAT_TYPE' domain&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Melges 24'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; print domainDict["BOAT_TYPE", 4] #access CODE = 4 from the 'BOAT_TYPE' domain&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Laser 2'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; print domainDict["BOAT_TYPE", 5] #access CODE = 5 from the 'BOAT_TYPE' domain&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Catalina 30'&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:01:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-get-the-description-value-of-a-field/m-p/447947#M35137</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T20:01:13Z</dc:date>
    </item>
  </channel>
</rss>

