<?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: JS Variable Text Output As Input Parameter For Geoprocessing Tool in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141439#M13150</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The GP service will run a Python script. That script takes it's inputs from a text file, and currently the text file is written in the Python script itself and saved locally. It's probably convoluted, but it's the way my company's scripts are written. These are long, complicated scripts that pull data from SQL databases and/or rasters, and create charts in Excel using VB scripts. I'm loath to try to alter them too much. I think I just need the input parameters from the GP service to take the place of the "get parameter as text" fields in the Python script. Those parameters are written to the text file. I've been entering them manually to make sure the GP tool works. Sorry if my posts have been confusing, I'm probably making this way more complicated than it needs to be.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2017 18:35:17 GMT</pubDate>
    <dc:creator>LloydBronn</dc:creator>
    <dc:date>2017-01-17T18:35:17Z</dc:date>
    <item>
      <title>JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141427#M13138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a blank map document. When any point on the map is clicked, the xy coordinates are converted to lat/lon and displayed in a popup. This popup also has a link to a&amp;nbsp;geoprocessing tool. Currently, this is just a ESRI sample GP tool that calculates the population within a 10km buffer around the point. I have created a script tool in ArcMap that runs a Python script that creates a chart in Excel from extracted raster values. I've successfully run this script in ArcMap and returned a chart.This will eventually be published on our server as a GP tool. The inputs for the Python script are latitude, longitude and location. At the moment I have these as user-entered parameters in the script tool. These parameters are used to write a text file that is passed in to the Python script. This may not be the most efficient way to go about this, but this is the way my companies scripts are written. &amp;nbsp;I want the input text file to be generated from the xy coordinates from the click event in the map. I've found a pretty helpful code snippet that does just that. The problem is, this text file is automatically downloads to the downloads folder on my local computer. Everything I've read suggests that it's impossible to specify a download directory because that opens our server to security risks. Is there any way around this with JS or HTML?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"click"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;saveTextAsFile&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; mp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; webMercatorUtils&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;webMercatorToGeographic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapPoint&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; x &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;toFixed&lt;/SPAN&gt;&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; y &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;y&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;toFixed&lt;/SPAN&gt;&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; textToSave &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; x&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;toString&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;","&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; y&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;toString&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;","&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Location"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; textToSaveAsBlob &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Blob&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;textToSave&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;type&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"text/plain"&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; textToSaveAsURL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; window&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;URL&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;createObjectURL&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;textToSaveAsBlob&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fileNameToSaveAs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"location.txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; downloadLink &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;createElement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"a"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; downloadLink&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;download &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fileNameToSaveAs&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; downloadLink&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;innerHTML &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Download File"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; downloadLink&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;href &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; textToSaveAsURL&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; downloadLink&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;onclick &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; destroyClickedElement&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; downloadLink&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;style&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;display &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"none"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;body&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;appendChild&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;downloadLink&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; downloadLink&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;click&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:47:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141427#M13138</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2021-12-11T07:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141428#M13139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lloyd,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;For security reason as you have already stated there is no workaround for specifying a output location for JS client code. You can develop a .Net web service for this but I bet you will find that the LOE is to high for the meer reason of that is the way your GP is written. It would be much easier to re-factor your GP to accept a string value instead of a file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 01:18:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141428#M13139</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-01-13T01:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141429#M13140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. How would I go about&amp;nbsp;outputting the string values from JS to pass them into Python?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 03:18:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141429#M13140</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-01-13T03:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141430#M13141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Lloyd, &amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp; Just like your current sample code passes th population GP a point you would pass a string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 12:58:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141430#M13141</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-01-13T12:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141431#M13142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Here is the section of Python code I have now. It's set to take input parameters as text from the text file&amp;nbsp;written from the click event. Would I need to write another function to output the results of click events as strings instead of writing a text file?&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;location_filepath &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"C:\\Website_Test\\Python_Scripts\\Test_Scripts\\Location_Input_Files"&lt;/SPAN&gt;

Latitude &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;
Longitude &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;
Location &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit;"&gt;2&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;

coordinate_list &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; open&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;location_filepath &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;+&lt;/SPAN&gt; &lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"\\"&lt;/SPAN&gt; &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;+&lt;/SPAN&gt; &lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"location.txt"&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"w"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;
coordinate_list&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;Latitude &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;+&lt;/SPAN&gt; &lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;","&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;
coordinate_list&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;Longitude &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit;"&gt;+&lt;/SPAN&gt; &lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;","&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;
coordinate_list&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;write&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;Location&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;strip&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;
coordinate_list&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;close&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:47:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141431#M13142</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2021-12-11T07:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141432#M13143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lloyd,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I am really confused here. I thought the workflow you were looking for was the user clicked on the map (in a JS app) and the click location was sent to a GP to be used as an input.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 15:28:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141432#M13143</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-01-17T15:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141433#M13144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;That's right. The GP tool is a standalone Python script, not a model. For&amp;nbsp;testing purposes I have it set to input the parameters as text, and then write these to&amp;nbsp;a text file. The script then reads that text file and pulls data for those coordinates from a raster and creates a chart in Excel. This works perfectly running the GP tool in ArcMap. I'm adapting scripts that run behind the scenes every day on our local network. They are all set up to take string inputs from text files. Right now we attach these charts to set points in web map services, but we want the user to be able to create charts on the fly based on map clicks.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Instead of manually entering the parameters, I want to just skip that step and have the text file&amp;nbsp;written from the output lat/lon coordinates from the map click. Using the example above, I can write a text file directly in the JS, but of course I can't specify where that file goes. Would it be possible to place this text file (or the string values from it) on a dummy HTML page on our server and access the values from the URL address instead from a local drive location?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 16:28:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141433#M13144</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-01-17T16:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141434#M13145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lloyd,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I am not GP expert but as the GP is running locally on the server you should be able to specify a location that the GP will write to. When developing GPs there is such a thing as a scratchworkspace that can be used so I would start googling there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 16:43:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141434#M13145</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-01-17T16:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141435#M13146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, but I still have to get the values from the map click out of the JS somehow. That's why I was asking about PHP. I haven't worked with it, but it seems like it's&amp;nbsp;more secure than JS.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 16:46:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141435#M13146</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-01-17T16:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141436#M13147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lloyd,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Sorry the capturing of the map click point and setting a string var to be passed to the GP service is so basic I am lost as to why you would think that you need another component like php to be added.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are using the Geoprocessor class from the API right?&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/geoprocessor-amd.html#submitjob" title="https://developers.arcgis.com/javascript/3/jsapi/geoprocessor-amd.html#submitjob"&gt;Geoprocessor | API Reference | ArcGIS API for JavaScript 3.19&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your GP Service has certain defined input parameters and one of them should be a lat lon string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 16:53:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141436#M13147</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-01-17T16:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141437#M13148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK. Thanks. I'll try it out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 17:26:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141437#M13148</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-01-17T17:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141438#M13149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might be jumping in a little late here - and maybe I dont understand - why are you taking the 2 input X/Y values, writing them to a text file and sending that to the GP Service? I dont understand why you're putting the XY into the textfile. Is the goal to return a textfile to the end user, or as I understand it, pass the textfile to the service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the service ultimately just needs the XY value, I think adding in a text file is just complicating it. You should still be able to achieve your workflow by passing the XY value to the GP Service.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 18:01:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141438#M13149</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2017-01-17T18:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: JS Variable Text Output As Input Parameter For Geoprocessing Tool</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141439#M13150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The GP service will run a Python script. That script takes it's inputs from a text file, and currently the text file is written in the Python script itself and saved locally. It's probably convoluted, but it's the way my company's scripts are written. These are long, complicated scripts that pull data from SQL databases and/or rasters, and create charts in Excel using VB scripts. I'm loath to try to alter them too much. I think I just need the input parameters from the GP service to take the place of the "get parameter as text" fields in the Python script. Those parameters are written to the text file. I've been entering them manually to make sure the GP tool works. Sorry if my posts have been confusing, I'm probably making this way more complicated than it needs to be.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 18:35:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-variable-text-output-as-input-parameter-for/m-p/141439#M13150</guid>
      <dc:creator>LloydBronn</dc:creator>
      <dc:date>2017-01-17T18:35:17Z</dc:date>
    </item>
  </channel>
</rss>

