<?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: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online in ArcGIS Notebooks Questions</title>
    <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1511515#M808</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/321441"&gt;@xlt208&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;do you have any further clue for us?&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;Sven&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2024 11:55:58 GMT</pubDate>
    <dc:creator>Sven_Harpering</dc:creator>
    <dc:date>2024-07-29T11:55:58Z</dc:date>
    <item>
      <title>File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1508032#M800</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;we have created a notebook in ArcGIS Online that creates a Word document based on various parameters. If we let the notebook run on its own, everything works. The output is written to the "arcgis/home" directory.&lt;/P&gt;&lt;P&gt;The next step would be to publish the notebook as a web tool in ArcGIS Online. To do this, we wanted to define an output parameter. The settings currently look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sven_Harpering_0-1721663506679.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110224i0FE1E3B44800F27A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sven_Harpering_0-1721663506679.png" alt="Sven_Harpering_0-1721663506679.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A first question would be what we have to specify as a default value in JSON format. According to the documentation, it has to be a URL to an existing output? Currently, we have simply uploaded the Word template as an item in ArcGIS Online and specified the URL to it.&lt;/P&gt;&lt;P&gt;Afterwards we added this snippet at the end of the notebook:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sven_Harpering_1-1721663506683.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110225i47E9E54D04A5E2B3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sven_Harpering_1-1721663506683.png" alt="Sven_Harpering_1-1721663506683.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The name of the variable equals the output variable name for the word file.&lt;/P&gt;&lt;P&gt;After publishing, we open the tool in map viewer and want to run it. Here we immediately notice that the output parameter does not appear in the GUI.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sven_Harpering_2-1721663507188.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110223i93D9991677261FF0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sven_Harpering_2-1721663507188.png" alt="Sven_Harpering_2-1721663507188.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The tool can still be started, but aborts with an error message in the output parameter area.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sven_Harpering_3-1721663506701.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110226i1AD749238AE08938/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sven_Harpering_3-1721663506701.png" alt="Sven_Harpering_3-1721663506701.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the error is in the output parameter section. Do you have any clue, what we are doing wrong in the whole output parameter section (Notebook config, etc.)? The input parameters work.&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Sven&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 15:51:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1508032#M800</guid>
      <dc:creator>Sven_Harpering</dc:creator>
      <dc:date>2024-07-22T15:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1508154#M801</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/132139"&gt;@Sven_Harpering&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reaching out!&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;For the default value, if there is a URL pointing to a file that you want to default to, you can specify the default value as {"url": "&amp;lt;url-to-file&amp;gt;"}. Alternatively, since it is okay to leave the URL blank, you can specify the value like this: {"url": ""}.&lt;/LI&gt;&lt;LI&gt;It is expected that the output parameters will not appear in the GUI before you run the tool. If you expect a value from the web tool users, please create an input parameter for it. Output parameters are what the notebook web tool will output after the tool finishes running and cannot be specified by the users.&lt;/LI&gt;&lt;LI&gt;Since the file ends up being a Microsoft Word item in the content, have you considered outputting it as a string instead of a file, with the string value pointing to the URL of the item's details page? That way, users can go to the item details page and proceed with sharing, downloading, or updating the item.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Could you please copy the error message in the last screenshot and paste it as text here? We are unable to read the error message very clearly. (The screenshot might have been compressed by the website when it was uploaded.)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Looking forward to hearing back from you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lingtao&lt;/P&gt;&lt;P&gt;Product Engineer for ArcGIS Notebooks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 17:39:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1508154#M801</guid>
      <dc:creator>xlt208</dc:creator>
      <dc:date>2024-07-22T17:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1508469#M803</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/321441"&gt;@xlt208&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I'm working with Sven on this project. Thanks for your guidance; it has already helped us a lot.&lt;/P&gt;&lt;P&gt;We are currently keeping {"url": ""} empty and have defined an input where the user can specify the output name. The .docx files are published as items in ArcGIS Online at the end. Our script creates a .docx file for each feature.&lt;/P&gt;&lt;P&gt;You asked for the error message. I don’t have access to it anymore because my script is working now. I think it was a problem with the specification of the output parameters and the URL we were pointing towards.&lt;/P&gt;&lt;P&gt;We want the user to select a feature on a map in the last step. The reports should then be created only for the selected features. This is possible in Experience Builder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BenGiese_1-1721728746492.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110348iE00A5E0E5DF1E127/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BenGiese_1-1721728746492.png" alt="BenGiese_1-1721728746492.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apparently, the problem is that the selected features are not being passed along. Our input parameter is a feature set, but we still need to convert it to a feature set in the script. The selected features are being lost in the input. Do you have any idea what we need to set up to ensure the selection is considered?&lt;/P&gt;&lt;P&gt;This is our setting for the input features paramter:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BenGiese_2-1721728752264.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110349iE3A413EB35FE4814/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BenGiese_2-1721728752264.png" alt="BenGiese_2-1721728752264.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the Code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;selected_damage = {
	"url": "https://services3.arcgis.com/JhD3NyxTJcNiae8J/arcgis/rest/services/survey123_25027c5ec6294a65a7a851be8740f6f8_results/FeatureServer/0"
}

#get the url and return a feature layer
feature_layer_url = selected_damage["url"]
feature_layer = FeatureLayer(feature_layer_url)

# Get the Feature set
feature_set = feature_layer.query(where="1=1")  # Abfrage mit allen Features&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Until now this only returns a feature set with all features of the feature layer, not the selected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 10:03:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1508469#M803</guid>
      <dc:creator>BenGiese</dc:creator>
      <dc:date>2024-07-23T10:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1508485#M804</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/321441"&gt;@xlt208&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/595780"&gt;@BenGiese&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;here is the error message:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sven_Harpering_0-1721732328078.png" style="width: 702px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110352i75E5B9D004AC6D19/image-dimensions/702x207?v=v2" width="702" height="207" role="button" title="Sven_Harpering_0-1721732328078.png" alt="Sven_Harpering_0-1721732328078.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As Ben wrote, we have updatet the script already, so we are not using the output parameter any longer. But maybe it is still interesting for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Sven&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 11:02:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1508485#M804</guid>
      <dc:creator>Sven_Harpering</dc:creator>
      <dc:date>2024-07-23T11:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1511515#M808</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/321441"&gt;@xlt208&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;do you have any further clue for us?&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;Sven&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 11:55:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1511515#M808</guid>
      <dc:creator>Sven_Harpering</dc:creator>
      <dc:date>2024-07-29T11:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1524624#M815</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/132139"&gt;@Sven_Harpering&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/595780"&gt;@BenGiese&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your patience! I was out of the office and could not respond sooner.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently in Map Viewer, it is not possible to use selected features as an input to an analysis tool. That said, if you configure a web tool in Experience Builder's Analysis widget, you will then be able to pass in selected features from the map popups and widgets like Select, Table, etc.&lt;/P&gt;&lt;P&gt;Here is an example of setting a selected feature as analysis input from a map popup:&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6360714408112w1016h540r698" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6360714408112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6360714408112w1016h540r698');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6360714408112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps. Please let me know if you have other questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Lingtao&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 18:42:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1524624#M815</guid>
      <dc:creator>xlt208</dc:creator>
      <dc:date>2024-08-20T18:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1529349#M819</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/321441"&gt;@xlt208&lt;/a&gt;, thank you very much!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 12:54:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1529349#M819</guid>
      <dc:creator>Sven_Harpering</dc:creator>
      <dc:date>2024-08-29T12:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1558656#M853</link>
      <description>&lt;P&gt;Hey Lingtao,&lt;BR /&gt;&lt;BR /&gt;i'm trying to export a list of groupIDs, names, and owners to a csv file.&amp;nbsp; I'm fine with that CSV file ending up in the HOME folder.&amp;nbsp; But when I publish, then try to run the tool, it fails.&amp;nbsp; The error message suggests I can't write to the output path..which is HOME.&amp;nbsp;&lt;BR /&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 15:08:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1558656#M853</guid>
      <dc:creator>Alex_Rodriguez</dc:creator>
      <dc:date>2024-11-14T15:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1558781#M854</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/716377"&gt;@Alex_Rodriguez&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It sounds like your code was attempting to write the CSV file into the /arcgis/home directory. Is that correct? This directory is unavailable for notebook web tools. You may need to change the output location to a relative path. Here is an example:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="n"&gt;csv_file&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="nb"&gt;open&lt;/SPAN&gt;&lt;SPAN class="p"&gt;("group_info.csv"&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;"w"&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="o"&gt;&lt;SPAN class="n"&gt;csv_file&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;write&lt;/SPAN&gt;&lt;SPAN class="p"&gt;("xxx"&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="o"&gt;&lt;SPAN class="n"&gt;csv_file&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;close&lt;/SPAN&gt;&lt;SPAN class="p"&gt;()&lt;BR /&gt;output_csv = {"url": "group_info.csv"}  # output parameter of the "File" type&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Looking forward to hearing how it goes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;Lingtao&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 18:03:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1558781#M854</guid>
      <dc:creator>xlt208</dc:creator>
      <dc:date>2024-11-14T18:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1559207#M855</link>
      <description>&lt;P&gt;Hey Lingtao,&lt;/P&gt;&lt;P&gt;Thanks for your reply. I added the line of code you suggested (assuming I interpreted your post correctly).&lt;BR /&gt;Here's what I ended up with:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;f = open("/arcgis/home/ExportFiles/GroupsList.csv", 
     mode='a', 
     encoding='utf-8')
f.write("whatever I'm writing to the file, line by line")
f.close()
output_csv = {"url": "/arcgis/home/ExportFiles/GroupsList.csv")&lt;/LI-CODE&gt;&lt;P&gt;Where:&amp;nbsp;&lt;BR /&gt;"ExportFiles" is a folder I created to store these output files&lt;BR /&gt;&lt;BR /&gt;I'm opening/closing the output file each time I write to it.&amp;nbsp; I imagine that's not as efficient as it could be...but that's what I'm doing.&lt;/P&gt;&lt;P&gt;End result:&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm getting the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 15:55:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1559207#M855</guid>
      <dc:creator>Alex_Rodriguez</dc:creator>
      <dc:date>2024-11-15T15:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1559699#M857</link>
      <description>&lt;P&gt;Okay, downloaded a sample notebook that creates 2 CSV files.&amp;nbsp;&amp;nbsp; Ran it as a notebook, works fine.&lt;BR /&gt;Published it and ran it as a tool.&amp;nbsp; Failed...for the same reason as mine.&lt;BR /&gt;So, as you mentioned, HOME is evidently not available to the tool.&amp;nbsp;&amp;nbsp; But I can't find documentation that indicates what IS available to a tool.&lt;BR /&gt;&lt;BR /&gt;Can anyone clue me in to what folder structure is available to a tool for writing files?&amp;nbsp; Your assistance would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;alex&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 15:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1559699#M857</guid>
      <dc:creator>Alex_Rodriguez</dc:creator>
      <dc:date>2024-11-18T15:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1559945#M858</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josh_sample.output.jpg" style="width: 925px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/119803i3B3E42BC328EA5FC/image-size/large?v=v2&amp;amp;px=999" role="button" title="josh_sample.output.jpg" alt="josh_sample.output.jpg" /&gt;&lt;/span&gt;Finally figured it out.&amp;nbsp;&amp;nbsp; Still have a problem though...&lt;BR /&gt;I have the tool running now (added the output parameter: that's what I was missing before.)&lt;BR /&gt;&lt;BR /&gt;So the tool runs and creates an output "STRING".&amp;nbsp;&amp;nbsp; So the new problem is, what am I supposed to do with the output string that is displayed in the "details" page after the tool completes its run?&amp;nbsp; I'm not able to copy the text from that details window.&amp;nbsp;&lt;BR /&gt;Anyone have ideas for that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 21:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1559945#M858</guid>
      <dc:creator>Alex_Rodriguez</dc:creator>
      <dc:date>2024-11-18T21:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1561487#M862</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/716377"&gt;@Alex_Rodriguez&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for your patience! I would like to suggest the following edits to your code snippet that creates a CSV file when the notebook is run as a web tool:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;f = open("GroupsList.csv", mode='a', encoding='utf-8')
f.write("whatever I'm writing to the file, line by line")
f.close()
output_csv = {"url": "GroupsList.csv"}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is how the output parameter should be configured.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xlt208_0-1732219433029.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120172iBDEAC7DF28328177/image-size/large?v=v2&amp;amp;px=999" role="button" title="xlt208_0-1732219433029.png" alt="xlt208_0-1732219433029.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The second cell was inserted using the "insert into notebook" button.&amp;nbsp;During a web tool job run, t&lt;SPAN&gt;his cell sends the value of the notebook variable to the web tool job as an output parameter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xlt208_0-1732219605340.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120175i5A4B9BBEEB69E5F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="xlt208_0-1732219605340.png" alt="xlt208_0-1732219605340.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With the configurations above, the web tool should output a CSV file that you can click to download.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xlt208_1-1732220267706.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120182iCE9E73C7B5B0EDFA/image-size/large?v=v2&amp;amp;px=999" role="button" title="xlt208_1-1732220267706.png" alt="xlt208_1-1732220267706.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please note that files created during notebook web tool job runs are not stored or retained in the workspace directory (/arcgis/home).&amp;nbsp;If you wish to keep the files, you can add them to the content as items. If there are other members who will be running the tool, the items will be added to their content. In that case, you may consider sharing the items with a group so that all items are organized in the same place. Here is a code snippet demonstrating the workflow for adding and sharing items:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;from datetime import datetime as dt
from arcgis.gis import GIS

# creating csv file
csv_name = f"test_{dt.now().strftime('%Y%m%d%H%M%S')}"
csv_path = f"{csv_name}.csv"
f = open(csv_path, mode="a", encoding="utf-8")
f.write("test1, test2, test3, test4")
f.close()
output_csv = {"url": csv_path}

# adding csv file as item
gis = GIS("home")
folder_name = "CSVs"
folder = gis.content.folders.get(folder_name) or gis.content.folders.create(folder_name)
csv_item = folder.add(
    item_properties={"title": csv_name, "type": "CSV"},
    file=csv_path
).result()

# sharing csv item to group
group_name = "CSVs Generated from Notebook Web Tools"
group = gis.groups.search(group_name)[0] if gis.groups.search(group_name) else gis.groups.create(
    title=group_name,
    tags=["csv"],
    membership_access="org"
)
csv_item.sharing.groups.add(group)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if you have any questions!&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Lingtao&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 21:09:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1561487#M862</guid>
      <dc:creator>xlt208</dc:creator>
      <dc:date>2024-11-21T21:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: File Output Paramter in WebTool that was published from a Notebook in ArcGIS Online</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1654637#M967</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/595780"&gt;@BenGiese&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/132139"&gt;@Sven_Harpering&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Were you ever able to figure out how to just get the output to be from the selected map features in Experience Builder and not the entire table of the layer? I'm running into the same issues that Ben had described above. Even when I just have selected features as the analysis input into the custom tool, I think because I'm doing the same as Ben's script above of passing the "url" dictionary value in as a variable the tool is then ignoring the selected features. However, I can't figure out how to get just the selected features to operate as a usable variable in the tool without passing the "url" dictionary value.&lt;/P&gt;&lt;P&gt;Any guidance would be extremely appreciated! This could be a big break through for my company's workflow if I can get this figured out.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 20:34:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/file-output-paramter-in-webtool-that-was-published/m-p/1654637#M967</guid>
      <dc:creator>ClaytonBurns2</dc:creator>
      <dc:date>2025-10-01T20:34:27Z</dc:date>
    </item>
  </channel>
</rss>

