<?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: How to execute Widget-action automatically after page loads? in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850794#M10863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert:&lt;/P&gt;&lt;P&gt;#1 - a static, hard coded query in some place is absolutely sufficient in my case *&lt;/P&gt;&lt;P&gt;#2 - I assume &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;openAtStart=true makes it simpler, so yes. Either way works, though.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Some more background: Currently a user needs to open&lt;A href="http://egis.umn.edu/dev/cppm%20unifier%20projects/"&gt; this app&lt;/A&gt;​ that shows capital projects as polygon features (sorry, really early prototype). To get a list of all the capital projects the user needs to use the Identify Widget and draw a large polygon around the general area. He then gets this really nice list in the "Results" tab, with hover effects and all sorts of good stuff (thank you!). What I want to accomplish is that the nice "Results" list is there in the first place already.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;*I can see that the Identify Widget make a call like &lt;SPAN style="color: #222222; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px;"&gt;&lt;A class="jive-link-external-small" href="http://...[my/" rel="nofollow" target="_blank"&gt;http://...[my&lt;/A&gt;&lt;SPAN&gt; server + service] ...query?f=json&amp;amp;where=&amp;amp;returnGeometry=true&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;geometry=%7B%22rings%22%3A%5B%5B%5B-10383528.531827696%2C5615152.250596391%5D%2C%5B-10383528.531827696%2C5622318.221998118%5D%2C%5B-10369846.303764667%2C5622318.221998118%5D%2C%5B-10369846.303764667%2C5615152.250596391%5D%2C%5B-10383528.531827696%2C5615152.250596391%5D%5D%5D%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D&amp;amp;geometryType=esriGeometryPolygon&amp;amp;inSR=102100&amp;amp;outFields=*&amp;amp;outSR=102100&lt;/SPAN&gt;&lt;/SPAN&gt; . &lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Hard coding this url in some place would work just fine for me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much. Tobias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Mar 2015 02:42:40 GMT</pubDate>
    <dc:creator>TobiasFimpel1</dc:creator>
    <dc:date>2015-03-04T02:42:40Z</dc:date>
    <item>
      <title>How to execute Widget-action automatically after page loads?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850792#M10861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all. I would love to be able to open a web app with a widget open AND already executed with some parameters. In my specific case this would be &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;​​​ 's awesome &lt;A _jive_internal="true" href="https://community.esri.com/docs/DOC-3250"&gt;Identify Widget&lt;/A&gt;, so that when user opens the app he/she is presented with a map and a dashboard-like list of features (e.g. incidents, projects, etc.). Using browser debug tools I can see the query that is sent to the server with a number of parameters, but that's pretty much where my dev. skills end. How/where would I even start placing a function that makes that call after the page has fully loaded?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this same idea can be applied to many widgets, for example charts, or elevation profile, etc. Thanks for any help/suggestions/comments!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 23:06:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850792#M10861</guid>
      <dc:creator>TobiasFimpel1</dc:creator>
      <dc:date>2015-03-03T23:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Widget-action automatically after page loads?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850793#M10862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tobias,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; This is a pretty involved request. So let me get some details before I can even begin to point you in the right direction.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Are you wanting to supply variable that are dynamic and possibly coming from the URL or are you talking something more static and coming from the identifyWidgets json file?&lt;/LI&gt;&lt;LI&gt;Will you have the Identify widget preloaded using openAtStart=true?&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 01:47:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850793#M10862</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-03-04T01:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Widget-action automatically after page loads?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850794#M10863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert:&lt;/P&gt;&lt;P&gt;#1 - a static, hard coded query in some place is absolutely sufficient in my case *&lt;/P&gt;&lt;P&gt;#2 - I assume &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;openAtStart=true makes it simpler, so yes. Either way works, though.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Some more background: Currently a user needs to open&lt;A href="http://egis.umn.edu/dev/cppm%20unifier%20projects/"&gt; this app&lt;/A&gt;​ that shows capital projects as polygon features (sorry, really early prototype). To get a list of all the capital projects the user needs to use the Identify Widget and draw a large polygon around the general area. He then gets this really nice list in the "Results" tab, with hover effects and all sorts of good stuff (thank you!). What I want to accomplish is that the nice "Results" list is there in the first place already.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;*I can see that the Identify Widget make a call like &lt;SPAN style="color: #222222; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px;"&gt;&lt;A class="jive-link-external-small" href="http://...[my/" rel="nofollow" target="_blank"&gt;http://...[my&lt;/A&gt;&lt;SPAN&gt; server + service] ...query?f=json&amp;amp;where=&amp;amp;returnGeometry=true&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;geometry=%7B%22rings%22%3A%5B%5B%5B-10383528.531827696%2C5615152.250596391%5D%2C%5B-10383528.531827696%2C5622318.221998118%5D%2C%5B-10369846.303764667%2C5622318.221998118%5D%2C%5B-10369846.303764667%2C5615152.250596391%5D%2C%5B-10383528.531827696%2C5615152.250596391%5D%5D%5D%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D&amp;amp;geometryType=esriGeometryPolygon&amp;amp;inSR=102100&amp;amp;outFields=*&amp;amp;outSR=102100&lt;/SPAN&gt;&lt;/SPAN&gt; . &lt;/SPAN&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Hard coding this url in some place would work just fine for me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much. Tobias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 02:42:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850794#M10863</guid>
      <dc:creator>TobiasFimpel1</dc:creator>
      <dc:date>2015-03-04T02:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Widget-action automatically after page loads?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850795#M10864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tobias,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Well based on your use case this was a lot simpler then I thought. In your \server\apps\&lt;STRONG&gt;xx&lt;/STRONG&gt;\widgets\Identify\widget.js change your startup function to look like this (lines 3 through 6):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; startup: function () {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.inherited(arguments);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(this.config.identifyGeom){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; html.setStyle(this.btnClear, 'display', 'block');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.identifyGeom = new Polygon(this.config.identifyGeom);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.identifyFeatures(this.identifyGeom);
&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;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add this to your \server\apps\&lt;STRONG&gt;xx&lt;/STRONG&gt;\configs\Identify\config_Identify.json:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;"identifyGeom": {"rings":[[[-10383528.531827696,5615152.250596391],[-10383528.531827696,5622318.221998118],[-10369846.303764667,5622318.221998118],[-10369846.303764667,5615152.250596391],[-10383528.531827696,5615152.250596391]]],"spatialReference":{"wkid":102100}},&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:28:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850795#M10864</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Widget-action automatically after page loads?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850796#M10865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert, all I can say is: you rock!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again, &lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 16:02:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-execute-widget-action-automatically-after/m-p/850796#M10865</guid>
      <dc:creator>TobiasFimpel1</dc:creator>
      <dc:date>2015-03-04T16:02:13Z</dc:date>
    </item>
  </channel>
</rss>

