<?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: Startup Widget From Conditional Logic in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/startup-widget-from-conditional-logic/m-p/816533#M7037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;That is absolutely the route to go when you are looking to not alter any of the core files like the MapManager.js or ConfigManager.js. You would create an inPanel false widget like the scalebar widget have it get the url parameter like this&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; myObject &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; jimuUtils&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;urlToObject&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;window&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;location&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;href&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;query &lt;SPAN class="operator 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="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;myObject&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esearch&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;myObject&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esearch &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"last48"&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; &lt;SPAN class="comment token"&gt;//do something&lt;/SPAN&gt;
&amp;nbsp; &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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 09:39:03 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-12T09:39:03Z</dc:date>
    <item>
      <title>Startup Widget From Conditional Logic</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/startup-widget-from-conditional-logic/m-p/816532#M7036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WAB Developer 2.7&lt;/P&gt;&lt;P&gt;Launchpad Theme&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement: onOpen of a Web AppBuilder app that contains two or more custom widgets, open a specific widget based upon a url parameter of the deployed WAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking for some design/architecture guidance.&amp;nbsp; We know how to acquire url parameters and their values so&amp;nbsp;this is more of an attempt&amp;nbsp;to understand where we would want to put logic to open specific widget based upon the value of that url parameter.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One idea is to have a "startup" widget whose sole existence is to get the url parameter value and open the other widget using the required logic. (ie. if &amp;amp;urlParamTodo=X then open widget 1, else if &amp;amp;urlParamTodo=Y then open widget 2, else if &amp;amp;urlParamTodo=Z then open widget 3).&amp;nbsp; This seems like the least disruptive approach and could alleviate the need to alter the framework.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But maybe there's an even better way.&amp;nbsp; Any comments or ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 18:55:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/startup-widget-from-conditional-logic/m-p/816532#M7036</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2018-04-30T18:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Startup Widget From Conditional Logic</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/startup-widget-from-conditional-logic/m-p/816533#M7037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;That is absolutely the route to go when you are looking to not alter any of the core files like the MapManager.js or ConfigManager.js. You would create an inPanel false widget like the scalebar widget have it get the url parameter like this&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; myObject &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; jimuUtils&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;urlToObject&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;window&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;location&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;href&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;query &lt;SPAN class="operator 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="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;myObject&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esearch&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;myObject&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esearch &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"last48"&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; &lt;SPAN class="comment token"&gt;//do something&lt;/SPAN&gt;
&amp;nbsp; &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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:39:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/startup-widget-from-conditional-logic/m-p/816533#M7037</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T09:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Startup Widget From Conditional Logic</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/startup-widget-from-conditional-logic/m-p/816534#M7038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I appreciate your input, Robert!&amp;nbsp; And thanks for the tip/sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 19:15:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/startup-widget-from-conditional-logic/m-p/816534#M7038</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2018-04-30T19:15:11Z</dc:date>
    </item>
  </channel>
</rss>

