<?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: Using Field Map as User Supplied Parameter with Merge tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83105#M6572</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ford,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What version of ArcGIS Pro are you working with? Could you share a screeshot of how your script tool looks like when opened in Pro (see example below)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="234" src="https://community.esri.com/legacyfs/online/486983_pastedImage_1.png" width="442" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Josphat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Mar 2020 15:37:01 GMT</pubDate>
    <dc:creator>JMutunga</dc:creator>
    <dc:date>2020-03-31T15:37:01Z</dc:date>
    <item>
      <title>Using Field Map as User Supplied Parameter with Merge tool</title>
      <link>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83102#M6569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for any and all replies in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create python script tool that uses the merge tool but I am having issues getting the field map to show and populate as I add features. As of now, it won't even populate. However, if I recreate this using ModelBuilder, it works as intended. I am starting to think I need to get into Tool Validation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the part I am having issues with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

&lt;SPAN class="comment token"&gt;#input features. Set output for merge&lt;/SPAN&gt;
polygonsToUse &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
mergedPolygons &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 
&lt;SPAN class="comment token"&gt;#get field map so user can remove unneccessary fields&lt;/SPAN&gt;
fieldMap &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#merge polygons&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Merge&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polygonsToUse&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;mergedPolygons&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;fieldMap&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and here is a screenshot of my&amp;nbsp;script tool parameter setup:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/486555_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:11:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83102#M6569</guid>
      <dc:creator>RobertFord1</dc:creator>
      <dc:date>2021-12-10T23:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Map as User Supplied Parameter with Merge tool</title>
      <link>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83103#M6570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try 'derived from' instead of optional (or is it direction?). I suspect optional ignores if the combo isn't actually selected/changed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Mar 2020 19:37:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83103#M6570</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-03-29T19:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Map as User Supplied Parameter with Merge tool</title>
      <link>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83104#M6571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan! Unfortunately that doesn't seem to work. When I change to derived, the Output Field Map parameter no longer shows up. I actually copied the script tool parameter setup from the merge tool to verify I had the correct settings for each (right-click Merge tool, then properties).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've started looking at python tool validation(&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/customizing-tool-behavior-in-a-python-toolbox.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/customizing-tool-behavior-in-a-python-toolbox.htm"&gt;Customizing tool behavior in a Python toolbox—Geoprocessing and Python | Documentation&lt;/A&gt;) and found another post that talks about this (&lt;A class="link-titled" href="https://gis.stackexchange.com/questions/324510/creating-field-mapping-parameter-in-arcpy-script" title="https://gis.stackexchange.com/questions/324510/creating-field-mapping-parameter-in-arcpy-script"&gt;arcgis 10.5 - Creating Field Mapping Parameter in Arcpy Script - Geographic Information Systems Stack Exchange&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess after looking into validation, I am wondering what the validation settings are for the Merge tool itself. When you look at it's properties, that does not show up. Creating this same tool in model builder works just fine so that tells me one of the tools, or model builder has built in validation somewhere.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2020 10:58:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83104#M6571</guid>
      <dc:creator>RobertFord1</dc:creator>
      <dc:date>2020-03-30T10:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Map as User Supplied Parameter with Merge tool</title>
      <link>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83105#M6572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ford,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What version of ArcGIS Pro are you working with? Could you share a screeshot of how your script tool looks like when opened in Pro (see example below)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="234" src="https://community.esri.com/legacyfs/online/486983_pastedImage_1.png" width="442" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Josphat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 15:37:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83105#M6572</guid>
      <dc:creator>JMutunga</dc:creator>
      <dc:date>2020-03-31T15:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Map as User Supplied Parameter with Merge tool</title>
      <link>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83106#M6573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Josphat!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am now going between ArcGIS Pro 2.4.3 and 2.3.2. After playing with it some more, I've noticed in 2.4.3 the field map will populate as the script is written currently, but only with the first feature it is given. If more than one feature is supplied for polygons, you have to click the Reset button to refresh the output fields. In 2.3.2 none of this happens.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In 2.4.3:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/486984_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In 2.3.2:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/486985_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 16:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83106#M6573</guid>
      <dc:creator>RobertFord1</dc:creator>
      <dc:date>2020-03-31T16:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Map as User Supplied Parameter with Merge tool</title>
      <link>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83107#M6574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reset button updates the last saved settings. So this is the expected behavior.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 17:46:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83107#M6574</guid>
      <dc:creator>JMutunga</dc:creator>
      <dc:date>2020-03-31T17:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using Field Map as User Supplied Parameter with Merge tool</title>
      <link>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83108#M6575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you are all set now? Please let us know if you have any additional questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josphat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 15:48:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-field-map-as-user-supplied-parameter-with/m-p/83108#M6575</guid>
      <dc:creator>JMutunga</dc:creator>
      <dc:date>2020-04-01T15:48:14Z</dc:date>
    </item>
  </channel>
</rss>

