<?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: Python Script tool's Custom validation doesn't work as a Geoprocessing Service in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503830#M39564</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to know.&amp;nbsp; The way the tool works in ArcGIS Desktop is the user chooses from a list of string values in the 1st drop-down menu, at which point the 2nd drop-down menu dynamically updates its choice list of string values depending on which choice the user picked from the 1st drop-down menu.&amp;nbsp; Could you give me advice or point me to documentation on how to do this validation in the JavaScript API?&amp;nbsp; Once the validation is done, I would need to pass the value that the user chooses from the 2nd drop-down menu as an input parameter to my geoprocessing model, which includes python script tools in the model.&amp;nbsp; The tool doesn't necessarily need to be implemented in the Web AppBuilder; I just thought that might be an easier way to do it than the API.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Sep 2015 18:04:25 GMT</pubDate>
    <dc:creator>AlexisGreen</dc:creator>
    <dc:date>2015-09-02T18:04:25Z</dc:date>
    <item>
      <title>Python Script tool's Custom validation doesn't work as a Geoprocessing Service</title>
      <link>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503828#M39562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a script tool for which I've written some simple custom validation that manipulates the user interface of the tool.&amp;nbsp; It basically updates the choice list in one drop-down menu based on the value the user chooses in another drop-down menu.&amp;nbsp; The tool validation works when running the GP tool in ArcGIS Desktop, but the validation doesn't work when I publish the script tool as a geoprocessing service and add it to the Geoprocessing widget within the Web AppBuilder.&amp;nbsp; From the help doc, I gather this may be a known limitation of the software?&amp;nbsp; If so, does anyone have a suggestion of how to go about implementing custom validation in a web application?&amp;nbsp; Perhaps by binding the GP service to the Geoprocessing task in the ArcGIS API for JavaScript?&amp;nbsp; Or maybe there is an easier way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 23:34:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503828#M39562</guid>
      <dc:creator>AlexisGreen</dc:creator>
      <dc:date>2015-09-01T23:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script tool's Custom validation doesn't work as a Geoprocessing Service</title>
      <link>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503829#M39563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm pretty sure what you're seeing within the script tool is by design. Once the tool is published to the server the custom validation logic will be removed. I don't really work with WebApp Builder, but if I were to use the JavaScript API I'd handle my tool validate within the client (i.e. on the JavaScript side). Could you provide more information on what your tool validator does?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2015 16:47:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503829#M39563</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-09-02T16:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script tool's Custom validation doesn't work as a Geoprocessing Service</title>
      <link>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503830#M39564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to know.&amp;nbsp; The way the tool works in ArcGIS Desktop is the user chooses from a list of string values in the 1st drop-down menu, at which point the 2nd drop-down menu dynamically updates its choice list of string values depending on which choice the user picked from the 1st drop-down menu.&amp;nbsp; Could you give me advice or point me to documentation on how to do this validation in the JavaScript API?&amp;nbsp; Once the validation is done, I would need to pass the value that the user chooses from the 2nd drop-down menu as an input parameter to my geoprocessing model, which includes python script tools in the model.&amp;nbsp; The tool doesn't necessarily need to be implemented in the Web AppBuilder; I just thought that might be an easier way to do it than the API.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2015 18:04:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503830#M39564</guid>
      <dc:creator>AlexisGreen</dc:creator>
      <dc:date>2015-09-02T18:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script tool's Custom validation doesn't work as a Geoprocessing Service</title>
      <link>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503831#M39565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm more familiar with the Runtime products to access services, so I'll start off by answering how I'd handle this there. I would expect that my validation logic that creates my lists would be removed once I publish the tool to the server. In runtime I'd handle my lists within my runtime application. Let's say I was using Runtime for .NET. Within the .NET client I'd build a control that contains two ComboBoxes. I would use the C# code in my client to control the values shown in these ComboBoxes in the same manner I handled it in my script tool validation logic. The user would interact with the client, which would handle getting the appropriate values to send off in a REST call to my gp server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've never really used WebAppBuilder, but I've used the JavaScript API and I'd just take the same approach there. If the values needed can be hard-coded, then I can use any language to present those choices to the user prior to making the REST call. If the values require that I parse the data, then I'd probably have to figure out if my client would allow me to access the data or I'd have to make a service that could kick me back the values I'd need from the data on the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2015 23:10:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503831#M39565</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-09-02T23:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script tool's Custom validation doesn't work as a Geoprocessing Service</title>
      <link>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503832#M39566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you - your explanation of the approach makes sense to me, in theory.&amp;nbsp;&amp;nbsp; It sounds like you have a good deal of development experience.&amp;nbsp; As I'm more experienced writing Python tools that run in ArcGIS desktop, and a beginner at JavaScript web development, I need to learn how to make what you describe work, in practice.&amp;nbsp; The values in the choice lists can be hard coded.&amp;nbsp; Do you happen to have any tips on writing this type of validation logic, as well as how to make REST calls to the GP server, using the JavaScript API?&amp;nbsp; Perhaps that conversation should be moved to a different discussion area since it would not be about Python anymore.&amp;nbsp; I appreciate your feedback!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 17:18:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-tool-s-custom-validation-doesn-t/m-p/503832#M39566</guid>
      <dc:creator>AlexisGreen</dc:creator>
      <dc:date>2015-09-03T17:18:27Z</dc:date>
    </item>
  </channel>
</rss>

