<?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: Finding and replacing a contingent value in a specific field in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/finding-and-replacing-a-contingent-value-in-a/m-p/1581065#M92577</link>
    <description>&lt;P&gt;Probably Field Calculate in the same way the values were originally changed.&amp;nbsp; Be aware this modifies the source data so try on a local copy first, and always keep a backup for some time.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field-examples.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field-examples.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ensure you past the&amp;nbsp; the 'Code Block' at the bottom of the Field Calculator window.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then above the Code Block you will have something that looks like &amp;lt;fieldname being calculated&amp;gt; =&lt;BR /&gt;in the box below that enter (obviously replace with your fieldname):&lt;BR /&gt;&lt;BR /&gt;Reclass(!Environmental Setting! )&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Expression:
Reclass(!Environmental Setting!)

Code Block:
def Reclass(field):
    if field == 'Hammock':
        return 'Pasture'
    elif field == 'Elephant':
        return 'Grass'
    elif field == 'Rhino':
        return 'Arable'
    else:
        return field

    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2025 22:27:56 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2025-01-31T22:27:56Z</dc:date>
    <item>
      <title>Finding and replacing a contingent value in a specific field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/finding-and-replacing-a-contingent-value-in-a/m-p/1580886#M92535</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am super new to ArcGIS so please don't judge me too harshly for what seems like an easy question that I can't get to work. I also apologize for being really bad at explaining things&lt;/P&gt;&lt;P&gt;I need to change specific values in a field into another value. So the field I have is Environmental Setting, which has contingent values of &amp;lt;Null&amp;gt;, Hammock, Pasture, etc. Presently, someone ran a script which changed all the values and I have the amazing job of changing them back manually. I've tried the find and replace tool, as well as calculate tool for .replace() and have failed. If I need to change all values of Hammock into Pasture, how would I do that?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 16:54:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/finding-and-replacing-a-contingent-value-in-a/m-p/1580886#M92535</guid>
      <dc:creator>Zindy</dc:creator>
      <dc:date>2025-01-31T16:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Finding and replacing a contingent value in a specific field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/finding-and-replacing-a-contingent-value-in-a/m-p/1580904#M92538</link>
      <description>&lt;P&gt;First, you will want to select by attribute. You can do this from the main ribbon at the top of ArcPro, or from the attribute table. Here's an example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZachBodenner_0-1738344270149.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/124444i4E4A6FDD1E009479/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_0-1738344270149.png" alt="ZachBodenner_0-1738344270149.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then right click the column and select Field Calculator:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZachBodenner_1-1738344306529.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/124445iA60D7A22B127F6B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_1-1738344306529.png" alt="ZachBodenner_1-1738344306529.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then simply type 'Pasture' and all of only the selected records will change. Be aware though, this will change&amp;nbsp;&lt;STRONG&gt;all&lt;/STRONG&gt; of the Hammock into Pasture, even the ones that were Hammock before that previous change.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 17:25:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/finding-and-replacing-a-contingent-value-in-a/m-p/1580904#M92538</guid>
      <dc:creator>ZachBodenner</dc:creator>
      <dc:date>2025-01-31T17:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Finding and replacing a contingent value in a specific field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/finding-and-replacing-a-contingent-value-in-a/m-p/1581065#M92577</link>
      <description>&lt;P&gt;Probably Field Calculate in the same way the values were originally changed.&amp;nbsp; Be aware this modifies the source data so try on a local copy first, and always keep a backup for some time.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field-examples.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field-examples.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ensure you past the&amp;nbsp; the 'Code Block' at the bottom of the Field Calculator window.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then above the Code Block you will have something that looks like &amp;lt;fieldname being calculated&amp;gt; =&lt;BR /&gt;in the box below that enter (obviously replace with your fieldname):&lt;BR /&gt;&lt;BR /&gt;Reclass(!Environmental Setting! )&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Expression:
Reclass(!Environmental Setting!)

Code Block:
def Reclass(field):
    if field == 'Hammock':
        return 'Pasture'
    elif field == 'Elephant':
        return 'Grass'
    elif field == 'Rhino':
        return 'Arable'
    else:
        return field

    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 22:27:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/finding-and-replacing-a-contingent-value-in-a/m-p/1581065#M92577</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2025-01-31T22:27:56Z</dc:date>
    </item>
  </channel>
</rss>

