<?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: Is there any way to share a tool from ArcGIS Pro as a web/geoprocessing tool without having a dataset loaded in by default? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-any-way-to-share-a-tool-from-arcgis-pro/m-p/787022#M1429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank goodness, I was able to remedy this problem (kind of) fairly easily once I dug around the geoprocessing package for a long while. After you add the downloaded geoprocessing package to your project, a folder is created that contains around 5 versions of your toolbox at about 3 different folder levels. The default path to find the one I wanted to use (with blank parameters and full validation functionality on load), for me, was something along the lines of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\Users\&lt;STRONG&gt;*USER NAME*&lt;/STRONG&gt;\Documents\ArcGIS\Packages\*&lt;STRONG&gt;NAME OF TOOL FOLLOWED BY A BUNCH OF CHARACTERS*&lt;/STRONG&gt;\p12\&lt;STRONG&gt;*Folder name of original script*\*NAME OF TOOLBOX*.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I included this default link schema within a "Read Me" file to direct the new users to it when adding the toolbox. Had a colleague go through the read me file and add the link, and it worked like a charm. Annoying, but it's a way to get it to work the way I needed it to. Note that if you don't want people to access your source code, you need to be sure to password protect it.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jul 2019 21:01:51 GMT</pubDate>
    <dc:creator>AaronLaver</dc:creator>
    <dc:date>2019-07-25T21:01:51Z</dc:date>
    <item>
      <title>Is there any way to share a tool from ArcGIS Pro as a web/geoprocessing tool without having a dataset loaded in by default?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-any-way-to-share-a-tool-from-arcgis-pro/m-p/787021#M1428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently created a "Geodatabase append" tool which, in a nutshell, batch process-appends all feature classes within a specified input geodatabase to a target "master" geodatabase, plus some optional functionality which deletes fields within the Master GDB prior to the append.&amp;nbsp;The tool works great in ArcGIS pro, but I'm seeking a way to&amp;nbsp;publish ONLY the tool to portal (not the dataset or reference to the dataset represented in the geoprocessing history). I've tried only uploading the schema, I've tried setting self.params&lt;X&gt;.value to empty all parameters upon initialization, and nothing seems to work.&amp;nbsp;&lt;/X&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone been able to successfully do this? In general, validation has been very tricky for me to get a handle on... but my code can be found below. If there's a general process answer or a script-based answer, I'd be open to both.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize this might sound like a cryptic question to some, so if I need to elaborate I'd be happy to. I'm hoping that I'm just a big dummy that overlooked something in my process to reach the desired result... but I digress. My validation code can be found below, if it helps. Thanks in advance for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I want to happen on load:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="454222" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/454222_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what happens when I&amp;nbsp;open the Published version:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="454223" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/454223_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;Or when I open the Schema Only Published version:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="454224" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/454224_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Validation Code:&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="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;ToolValidator&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="string token"&gt;"""Class for validating a tool's parameter values and controlling
    the behavior of the tool's dialog."""&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;"""Setup arcpy and the list of tool parameters."""&lt;/SPAN&gt; 
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;params &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterInfo&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;initializeParameters&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;"""Refine the properties of a tool's parameters. This method is 
        called when the tool is opened."""&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;# Thought I had to throw this in the the published version to clear fields, but &lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;# this didn't work to clear either&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;params&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;value &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;params&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="punctuation token"&gt;.&lt;/SPAN&gt;value &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;params&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="punctuation token"&gt;.&lt;/SPAN&gt;value &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;params&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;value &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&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;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;"""Modify the values and properties of parameters before internal
        validation is performed. This method is called whenever a parameter
        has been changed."""&lt;/SPAN&gt;

        &lt;SPAN class="comment token"&gt;# Lots of syntax not related to this post&lt;/SPAN&gt;

        &lt;SPAN class="comment token"&gt;# A "hide" function which works only in the original script tool, not the &lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;# published versions&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;params&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="punctuation token"&gt;.&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;params&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;enabled &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;params&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;enabled &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;updateMessages&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;"""Modify the messages created by internal validation for each tool
        parameter. This method is called after internal validation."""&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;/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>Sun, 12 Dec 2021 08:58:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-any-way-to-share-a-tool-from-arcgis-pro/m-p/787021#M1428</guid>
      <dc:creator>AaronLaver</dc:creator>
      <dc:date>2021-12-12T08:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to share a tool from ArcGIS Pro as a web/geoprocessing tool without having a dataset loaded in by default?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-any-way-to-share-a-tool-from-arcgis-pro/m-p/787022#M1429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank goodness, I was able to remedy this problem (kind of) fairly easily once I dug around the geoprocessing package for a long while. After you add the downloaded geoprocessing package to your project, a folder is created that contains around 5 versions of your toolbox at about 3 different folder levels. The default path to find the one I wanted to use (with blank parameters and full validation functionality on load), for me, was something along the lines of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\Users\&lt;STRONG&gt;*USER NAME*&lt;/STRONG&gt;\Documents\ArcGIS\Packages\*&lt;STRONG&gt;NAME OF TOOL FOLLOWED BY A BUNCH OF CHARACTERS*&lt;/STRONG&gt;\p12\&lt;STRONG&gt;*Folder name of original script*\*NAME OF TOOLBOX*.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I included this default link schema within a "Read Me" file to direct the new users to it when adding the toolbox. Had a colleague go through the read me file and add the link, and it worked like a charm. Annoying, but it's a way to get it to work the way I needed it to. Note that if you don't want people to access your source code, you need to be sure to password protect it.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 21:01:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/is-there-any-way-to-share-a-tool-from-arcgis-pro/m-p/787022#M1429</guid>
      <dc:creator>AaronLaver</dc:creator>
      <dc:date>2019-07-25T21:01:51Z</dc:date>
    </item>
  </channel>
</rss>

