<?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: Custom GP Script Tool - Remove item from filer.list if duplicated in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/custom-gp-script-tool-remove-item-from-filer-list/m-p/1252662#M64759</link>
    <description>&lt;P&gt;How embarrissing. It was that simple.&lt;/P&gt;&lt;P&gt;Thanks for the quick response&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3515"&gt;@DuncanHornby&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 29 Jan 2023 00:27:08 GMT</pubDate>
    <dc:creator>julian_svcs</dc:creator>
    <dc:date>2023-01-29T00:27:08Z</dc:date>
    <item>
      <title>Custom GP Script Tool - Remove item from filer.list if duplicated</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-gp-script-tool-remove-item-from-filer-list/m-p/1252656#M64756</link>
      <description>&lt;P&gt;I am creating a custom GP script tool and setting some validations.&lt;/P&gt;&lt;P&gt;The tool has a parameter to select an ArcGIS Pro APRX project and another parameter that has a dropdown list (filer.list) with the map names from the APRX project selected. The map select is a multiple option so I can select multiple maps that I want to work with in my python script (for the tool).&lt;/P&gt;&lt;P&gt;As it is now, I am able to select the same map multiple times. I have an error message that will show if I select a map that I have already selected, so the user will not be able to run the tool until all the maps selected are unique.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if self.params[3].altered:
    last_map_added = self.params[3].valueAsText.split(";")[-1]
    map_list_befor_last_map_added = self.params[3].valueAsText.split(";")[:-1]
    if last_map_added in map_list_befor_last_map_added:
        self.params[3].setErrorMessage(f"\"{last_map_added}\" already exists in Map List.\nPlease remove this map from Map List.")&lt;/LI-CODE&gt;&lt;P&gt;Is it possible to remove the duplicated map from the selected map list instead of just showing an error message.&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;P&gt;Julian.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 00:08:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-gp-script-tool-remove-item-from-filer-list/m-p/1252656#M64756</guid>
      <dc:creator>julian_svcs</dc:creator>
      <dc:date>2023-01-29T00:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom GP Script Tool - Remove item from filer.list if duplicated</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-gp-script-tool-remove-item-from-filer-list/m-p/1252660#M64757</link>
      <description>&lt;P&gt;Just guessing, could it be as simple as?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;self.params[3].value = self.params[3].valueAsText.split(";")[:-1]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 00:21:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-gp-script-tool-remove-item-from-filer-list/m-p/1252660#M64757</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2023-01-29T00:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Custom GP Script Tool - Remove item from filer.list if duplicated</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/custom-gp-script-tool-remove-item-from-filer-list/m-p/1252662#M64759</link>
      <description>&lt;P&gt;How embarrissing. It was that simple.&lt;/P&gt;&lt;P&gt;Thanks for the quick response&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3515"&gt;@DuncanHornby&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 00:27:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/custom-gp-script-tool-remove-item-from-filer-list/m-p/1252662#M64759</guid>
      <dc:creator>julian_svcs</dc:creator>
      <dc:date>2023-01-29T00:27:08Z</dc:date>
    </item>
  </channel>
</rss>

