<?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: Sharing a variable between Widgets in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841106#M9317</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why you are not getting the value. Try adding this line to widgetB:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14363722881936314 jive_macro_code jive_text_macro" data-renderedposition="92_8_912_16" jivemacro_uid="_14363722881936314"&gt;&lt;P&gt;console.info(WidgetManager.getInstance().getWidgetsByName('blablabla'));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;and see if you are actually getting the widget object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jul 2015 16:18:17 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2015-07-08T16:18:17Z</dc:date>
    <item>
      <title>Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841094#M9305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sorry by advance for my question, I'm a beguiner with the Web App Builder for Developpers...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two different widget, one for visualisation and another for basics statistics. For each one, I use a query where the where clause is in a variable and I would like them to use the same where clause but I don't how to do for make them sharing this variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 12:36:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841094#M9305</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-08T12:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841095#M9306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can use "jimu/WidgetManager" in your require for one of your widgets and then use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var theWhereClause = WidgetManager.getInstance().getWidgetsByName('YourOtherWidgetsName').YOURPUBLICVAR;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your other widget would need to have a public var like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;return declare([_WidgetBase, _TemplatedMixin], {
&amp;nbsp;&amp;nbsp;&amp;nbsp; templateString: template,
&amp;nbsp;&amp;nbsp;&amp;nbsp; _currentSelectedBookmarkRowNode: null,
&amp;nbsp;&amp;nbsp;&amp;nbsp; _currentSelectedBookmarkLoadingDiv: null,
&amp;nbsp;&amp;nbsp;&amp;nbsp; _lastExtent: null,
&amp;nbsp;&amp;nbsp;&amp;nbsp; YOURPUBLICVAR: 'something',&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:16:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841095#M9306</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841096#M9307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So If I understand, I have two widgets :&lt;/P&gt;&lt;P&gt;In the first one where the whereClause is defined by selectors (because the whereClause is Dynamic...doesn't generate problems ?) I have to define the Widget Manager and the public var.&lt;/P&gt;&lt;P&gt;And in the second one where the whereClause will be re-used for another query, I just have to define the var whereClause in the :&lt;/P&gt;&lt;P&gt;return declare([ BaseWidget, _WidgetsInTemplateMixin],{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; baseClass: 'jimu-widget-test',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name: 'Test_Dashboard',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var whereClause = blablabla...,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or I didn't understood ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(sorry by advance but I'm a beginner...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 13:44:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841096#M9307</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-08T13:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841097#M9308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You define the dynamic whereClause in widgetA and in widgetB you add the widgetManger and retrieve the dynamic whereClause from widgetA. Now what triggers widgetB to retrieve the dynamic whereClause in widgetA is another question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is your desired workflow?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;dynamic whereClause in widgetA is changed &amp;gt; then in widgetB you manually click a button or something and it will retrieve the dynamic whereClause from widgetA and execute the query in widgetB&lt;/LI&gt;&lt;LI&gt;dynamic whereClause in widgetA is changed &amp;gt; automatically widgetB will retrieve the dynamic whereClause from widgetA and execute the query in widgetB&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 13:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841097#M9308</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-08T13:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841098#M9309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The better workflow should be the dynamic refresh of the whereclause ! How do you think is it possible to do this ? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 14:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841098#M9309</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-08T14:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841099#M9310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; OK then this would be the better route then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WidgetA has the dynamic whereClause and when it changes you fire off a function that calls a function that exists in widgetB. You get access to the function in widgetB using WidgetManager.getInstance().getWidgetsByName('widgetB').executeQuery(newWhereClauseVar);&lt;/P&gt;&lt;P&gt;So widgetB would have to have a "executeQuery" function that take a parameter for the whereClause string. Let me know if this is enough to go on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 14:21:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841099#M9310</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-08T14:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841100#M9311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmm juste a question : Am I forced to use the &lt;SPAN class="keyword" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt; theWhereClause = WidgetManager.getInstance().getWidgetsByName(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;'YourOtherWidgetsName'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;).YOURPUBLICVAR; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5;"&gt;Becauce by my side, this syntax doesn't work (theWhereClause is undefined) but the YOURPUBLICVAR can be used simply and sent me back the good value ... I don't really understand this behavior...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;For the workflow it seems to be great, I'll try to make run something like that !&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 14:49:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841100#M9311</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-08T14:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841101#M9312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; No you can use whatever var name you want or not actually set a var. You can just do something like this (if you want):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14363676004133231 jive_macro_code jive_text_macro" data-renderedposition="92_8_912_16" jivemacro_uid="_14363676004133231"&gt;&lt;P&gt;query.where = &lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;WidgetManager.getInstance().getWidgetsByName(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;'YourOtherWidgetsName'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;).YOURPUBLICVAR;&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 14:59:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841101#M9312</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-08T14:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841102#M9313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ahah no, my problem is not the name of the variable but the&amp;nbsp; WidgetManager.getInstance().getWidgetsByName('nameofwidget').publicvar; ... I dont understand why my Widget B can understand the Widget A's publicvar but not the Widget B's created var (with the .getinstance.getwidgetbyname...syntax) !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why I ask if it is usefull and/or forced to use the&amp;nbsp; "...WidgetManager.getInstance().getWidgetsByName('widgetname')..." syntax ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 15:08:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841102#M9313</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-08T15:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841103#M9314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OK, you have me confused...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WidgetB can get to WidgetAs var because it is global (based on this code):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;define(['dojo/_base/declare', 'jimu/BaseWidget'],
function(declare, BaseWidget) {
&amp;nbsp; return declare([BaseWidget], {

&amp;nbsp;&amp;nbsp;&amp;nbsp; baseClass: 'toggle-basemap-widget',
&amp;nbsp;&amp;nbsp;&amp;nbsp; name: 'ToggleBasemap',
&amp;nbsp;&amp;nbsp;&amp;nbsp; myWhereClause: '',
&amp;nbsp;&amp;nbsp;&amp;nbsp; // DO NOT use "var" myWhereClause as that make it local.&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So yes you are forced to use the ...WidgetManager.getInstance().getWidgetsByName('widgetname')... syntax. This is the way that WidgetA knows what WidgetB is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So using the above code sample the code would look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query.where = WidgetManager.getInstance().getWidgetsByName('ToggleBasemap').myWhereClause;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:16:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841103#M9314</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841104#M9315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay juste going from the basics :&lt;/P&gt;&lt;P&gt;In my Widget A (with whereClause Selector) I have :&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;define([
&amp;nbsp; 'dojo/_base/declare',
&amp;nbsp; 'dijit/_WidgetsInTemplateMixin',
&amp;nbsp; 'jimu/BaseWidget',
...
function(
&amp;nbsp; declare,
&amp;nbsp; _WidgetsInTemplateMixin,
&amp;nbsp; BaseWidget,
...
return declare([
&amp;nbsp; BaseWidget,
&amp;nbsp; _WidgetsInTemplateMixin],{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; baseClass: 'blabla',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name: 'blablabla',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theWhereClause: '',
...
theSelectorFunction: function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blablablablablabla
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theWhereClause = "DateSelected = '16/02/2015'";
...&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in the Widget B (where I want to use the whereClause value for another query) I have :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;define([
&amp;nbsp; 'dojo/_base/declare',
&amp;nbsp; 'dijit/_WidgetsInTemplateMixin',
&amp;nbsp; 'jimu/BaseWidget',
&amp;nbsp; 'jimu/WidgetManager',
...
function(
&amp;nbsp; declare,
&amp;nbsp; _WidgetsInTemplateMixin,
&amp;nbsp; BaseWidget,
&amp;nbsp; WidgetManager,
...
return declare([
&amp;nbsp;&amp;nbsp; BaseWidget,
&amp;nbsp; _WidgetsInTemplateMixin],{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; baseClass: 'blabla',
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name: 'ahahah',
...
onOpen: function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myWhereClause = WidgetManager.getInstance().getWidgetsByName('blablabla').theWhereClause;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(myWhereClause);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(theWhereClause);
...&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And with that, myWhereClause return "undefined" and theWhereClaus&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;e return &lt;SPAN style="color: rgba(0, 0, 0, 0); font-size: 12px;"&gt;"DateSelected = '16/02/2015'" &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12px;"&gt;(the value selected with the widget A !) So now I don't understand what append...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:16:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841104#M9315</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2021-12-12T10:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841105#M9316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sh*t my answer had a bug too ! Can you read easily what I writed or do you want me to re-edit this ?&lt;/P&gt;&lt;P&gt;(I don't know why but the end of my message is write in white)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 16:16:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841105#M9316</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-08T16:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841106#M9317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why you are not getting the value. Try adding this line to widgetB:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14363722881936314 jive_macro_code jive_text_macro" data-renderedposition="92_8_912_16" jivemacro_uid="_14363722881936314"&gt;&lt;P&gt;console.info(WidgetManager.getInstance().getWidgetsByName('blablabla'));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;and see if you are actually getting the widget object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 16:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841106#M9317</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-08T16:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841107#M9318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OK, I see the result of console.log(theWhereClause);&lt;/P&gt;&lt;P&gt;I have to say that I have never seen the ability to get a widgets var by doing it that way from another widget...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 16:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841107#M9318</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-08T16:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841108#M9319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ahahah I don't know if it is a good thing or not...&lt;/P&gt;&lt;P&gt;So that's why I ask this question, because this way seems to be the simplest one but I don't know if it can generate some problems...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;console.info(WidgetManager.getInstance().getWidgetsByName(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit;"&gt;'blablabla'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;));&amp;nbsp; gimme back a [] and nothing else...I don't know if it's good or not too ...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 16:38:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841108#M9319</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-08T16:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841109#M9320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am so sorry. I forgot that widget manager returns an array when searching for a widget by name.&amp;nbsp; So the code should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14363739874763228 jive_macro_code jive_text_macro" data-renderedposition="92_8_912_16" jivemacro_uid="_14363739874763228" modifiedtitle="true"&gt;&lt;P&gt;query.where = WidgetManager.getInstance().getWidgetsByName('ToggleBasemap')[0].myWhereClause;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I think that getting the myWhereClause the other way will be an issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 16:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841109#M9320</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-08T16:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841110#M9321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem, don't worry !&lt;/P&gt;&lt;P&gt;The &lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;WidgetManager.getInstance().getWidgetsByName(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue;"&gt;'ToggleBasemap'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;)[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: green;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000;"&gt;].myWhereClause;&amp;nbsp; &lt;/SPAN&gt; method don't gimme back anything ... It's juste blank in the console...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 07:59:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841110#M9321</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-09T07:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841111#M9322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Lets have you try to get a variable from a esri widget that is normally loaded with WAB to test then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14364477981602578 jive_text_macro" data-renderedposition="134_8_912_16" jivemacro_uid="_14364477981602578"&gt;&lt;P&gt;console.info(WidgetManager.getInstance().getWidgetsByName('Geocoder')[0].hardcodeRegExp);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result should be: "/geocode(.){0,3}\.arcgis.com\/arcgis\/rest\/services\/World\/GeocodeServer/g"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 13:16:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841111#M9322</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-09T13:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sharing a variable between Widgets</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841112#M9323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sorry I made a mistake into the code of my first widget, so now, it's ok for the .get.get(blablablah) syntaxe !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I call myWhereClause variable with .get.get() in the onOpen function so the whereclause is refreshed more or less each time I open my Widget B...and after it's going on I think... Not working well at this time, but it will be ok !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your help !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 16:52:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/sharing-a-variable-between-widgets/m-p/841112#M9323</guid>
      <dc:creator>FlorianCADOZ</dc:creator>
      <dc:date>2015-07-09T16:52:09Z</dc:date>
    </item>
  </channel>
</rss>

