<?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 ESRI Python Toolbox: Limiting Input Parameter to only a File Geodatbase in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/esri-python-toolbox-limiting-input-parameter-to/m-p/229821#M17793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;I've been working with ESRI Python toolboxes for a while but I'm still having difficulties setting an input parameter as a "DEWorkspace" and using the parameter filter to make it so only file geodatabases are visible to the end user when entering parameters.&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;I'm using 10.5 and this is the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.5/analyze/creating-tools/defining-parameters-in-a-python-toolbox.htm" rel="nofollow noreferrer noopener" style="color: #1d4d5c; border: 0px; font-weight: inherit; text-decoration: underline;" target="_blank"&gt;ESRI documentation&lt;/A&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;param0 &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;Parameter&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;(
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;displayName&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"Input Workspace"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
name&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"in_workspace"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
datatype&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"DEWorkspace"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
parameterType&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"Required"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
direction&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"Input"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;)
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;# Set the filter to accept only local (personal or file) geodatabases&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
param0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;filter&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;list &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"Local Database"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
params &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;param0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;return&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt; params
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;The problem I'm encountering is that this filter doesn't seem to actually limit what the end user can see or enter as parameter. For example when they navigate to provide a file geodatabse the dialog allows them to see and enter .lyr files.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;&lt;IMG src="https://i.stack.imgur.com/dWa2R.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f9f8f6; color: #242729; font-weight: 400;"&gt;&lt;STRONG&gt;I'm assuming that you should be able to limit what the end user can see and enter when it comes to workspaces?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f9f8f6; color: #242729;"&gt;&lt;STRONG&gt;&lt;A href="https://community.esri.com/space/2145" target="_blank"&gt;Python&lt;/A&gt;&lt;A href="https://community.esri.com/space/2059" target="_blank"&gt;GIS Developers&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 11:10:26 GMT</pubDate>
    <dc:creator>FredKellner2</dc:creator>
    <dc:date>2021-12-11T11:10:26Z</dc:date>
    <item>
      <title>ESRI Python Toolbox: Limiting Input Parameter to only a File Geodatbase</title>
      <link>https://community.esri.com/t5/python-questions/esri-python-toolbox-limiting-input-parameter-to/m-p/229821#M17793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;I've been working with ESRI Python toolboxes for a while but I'm still having difficulties setting an input parameter as a "DEWorkspace" and using the parameter filter to make it so only file geodatabases are visible to the end user when entering parameters.&lt;/P&gt;&lt;P style="color: #242729; background-color: #f9f8f6; border: 0px; margin: 0px 0px 1em;"&gt;I'm using 10.5 and this is the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.5/analyze/creating-tools/defining-parameters-in-a-python-toolbox.htm" rel="nofollow noreferrer noopener" style="color: #1d4d5c; border: 0px; font-weight: inherit; text-decoration: underline;" target="_blank"&gt;ESRI documentation&lt;/A&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;param0 &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;Parameter&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;(
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;displayName&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"Input Workspace"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
name&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"in_workspace"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
datatype&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"DEWorkspace"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
parameterType&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"Required"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
direction&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"Input"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;)
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #858c93; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;# Set the filter to accept only local (personal or file) geodatabases&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
param0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;filter&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;list &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;"Local Database"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
params &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;param0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;    
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt;return&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px; margin: 0px;"&gt; params
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;The problem I'm encountering is that this filter doesn't seem to actually limit what the end user can see or enter as parameter. For example when they navigate to provide a file geodatabse the dialog allows them to see and enter .lyr files.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #242729; background-color: #f9f8f6;"&gt;&lt;IMG src="https://i.stack.imgur.com/dWa2R.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f9f8f6; color: #242729; font-weight: 400;"&gt;&lt;STRONG&gt;I'm assuming that you should be able to limit what the end user can see and enter when it comes to workspaces?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f9f8f6; color: #242729;"&gt;&lt;STRONG&gt;&lt;A href="https://community.esri.com/space/2145" target="_blank"&gt;Python&lt;/A&gt;&lt;A href="https://community.esri.com/space/2059" target="_blank"&gt;GIS Developers&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:10:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-python-toolbox-limiting-input-parameter-to/m-p/229821#M17793</guid>
      <dc:creator>FredKellner2</dc:creator>
      <dc:date>2021-12-11T11:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI Python Toolbox: Limiting Input Parameter to only a File Geodatbase</title>
      <link>https://community.esri.com/t5/python-questions/esri-python-toolbox-limiting-input-parameter-to/m-p/229822#M17794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your 'getParameterInfo' section is ok.&amp;nbsp; You will want to see all the folders, etc. to be able to navigate to the gdb.&amp;nbsp; You&amp;nbsp;can then use 'updateMessages' to display an error message&amp;nbsp;if a file or personal geodatabase is not selected.&amp;nbsp; To clear the error, the user would need to make the proper choice or exit the tool.&amp;nbsp; &amp;nbsp;EDIT: changed line 31 'and' to 'or'.&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;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Tool&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;object&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;__init__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;"""Define the tool (tool name is the name of the class)."""&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;label &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Tool"&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;description &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;canRunInBackground &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;getParameterInfo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;"""Define parameter definitions"""&lt;/SPAN&gt;
        param0 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Parameter&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
            displayName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Input Workspace"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"in_workspace"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            datatype &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DEWorkspace"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            parameterType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Required"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            direction &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Input"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;param0&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;isLicensed&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;updateParameters&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; parameters&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;updateMessages&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; parameters&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;"""Modify the messages created by internal validation for each tool
        parameter.  This method is called after internal validation."""&lt;/SPAN&gt;

         &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; parameters&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;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;valueAsText &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            gdb &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; parameters&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;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;valueAsText
            desc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gdb&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; desc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dataType &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Workspace"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;or&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; gdb&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;upper&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'.GDB'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'.MDB'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                parameters&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;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;setErrorMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Please select a file or personal geodatabase (.gdb or .mdb)"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;execute&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; parameters&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; messages&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;"""The source code of the tool."""&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;return&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;/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;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;/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:10:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-python-toolbox-limiting-input-parameter-to/m-p/229822#M17794</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-11T11:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI Python Toolbox: Limiting Input Parameter to only a File Geodatbase</title>
      <link>https://community.esri.com/t5/python-questions/esri-python-toolbox-limiting-input-parameter-to/m-p/229823#M17795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Randy. While it looks like your solution will accomplish my desired outcome. I guess I'm still really wanting to know if the filter options outlined in the documentation are accurate and function as outlined.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2019 19:19:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-python-toolbox-limiting-input-parameter-to/m-p/229823#M17795</guid>
      <dc:creator>FredKellner2</dc:creator>
      <dc:date>2019-07-22T19:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: ESRI Python Toolbox: Limiting Input Parameter to only a File Geodatbase</title>
      <link>https://community.esri.com/t5/python-questions/esri-python-toolbox-limiting-input-parameter-to/m-p/1110344#M62767</link>
      <description>&lt;P&gt;I tested your code and it works ust fine, I think it has been solved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But maybe you can try to do this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;param0 = arcpy.Parameter(
            displayName="Input Workspace",    
            name="in_workspace",    
            datatype="DEWorkspace",    
            parameterType="Required",
            direction="Input")    
 # Set the filter to accept only local (personal or file)geodatabases    
 param0.filter.list = ["Local Database",'gdb']    
 params = [param0] &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Check how I added "gdb" to the filter list.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 17:03:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/esri-python-toolbox-limiting-input-parameter-to/m-p/1110344#M62767</guid>
      <dc:creator>Santiago_Plazas</dc:creator>
      <dc:date>2021-10-22T17:03:54Z</dc:date>
    </item>
  </channel>
</rss>

