<?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 How to pass the data from one widget to another widget in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-pass-the-data-from-one-widget-to-another/m-p/741093#M578</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have array of data in a widget ,i have published it using below method,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;this.publishData({&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; 'target':"Labelwidget"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; 'data': currentWidget.publishObj&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; });&lt;/SPAN&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;i was unable to access the data from other widget&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;this.fetchDataByName('visiblelayerwidget');&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; i have taken widget communication sample has reference.&lt;BR /&gt; &lt;BR /&gt; so,please help me in this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Feb 2019 13:23:16 GMT</pubDate>
    <dc:creator>tarunvisvanadula1</dc:creator>
    <dc:date>2019-02-07T13:23:16Z</dc:date>
    <item>
      <title>How to pass the data from one widget to another widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-pass-the-data-from-one-widget-to-another/m-p/741093#M578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have array of data in a widget ,i have published it using below method,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;this.publishData({&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; 'target':"Labelwidget"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; 'data': currentWidget.publishObj&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt; });&lt;/SPAN&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;i was unable to access the data from other widget&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;this.fetchDataByName('visiblelayerwidget');&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; i have taken widget communication sample has reference.&lt;BR /&gt; &lt;BR /&gt; so,please help me in this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 13:23:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-pass-the-data-from-one-widget-to-another/m-p/741093#M578</guid>
      <dc:creator>tarunvisvanadula1</dc:creator>
      <dc:date>2019-02-07T13:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass the data from one widget to another widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-pass-the-data-from-one-widget-to-another/m-p/741094#M579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tarun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Do you have an onRecieveData function in your&amp;nbsp;Labelwidget?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I would have my visiblelayerwidget:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;startup&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&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;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;inherited&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arguments&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="comment token"&gt;// this is so you can catch any communication that occured before your widget started up&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;fetchData&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="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="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;

onReceiveData&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; source&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; params&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;params &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; params&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;target &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Labelwidget"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;//do something with params.data&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="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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:32:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-pass-the-data-from-one-widget-to-another/m-p/741094#M579</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T07:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass the data from one widget to another widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-pass-the-data-from-one-widget-to-another/m-p/741095#M580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi robert,&lt;/P&gt;&lt;P&gt;Thanks for the support,i have doubt is it possible to use below method more than once in single widget?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; border: 0px;"&gt;this.publishData({&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; border: 0px;"&gt;'target':"Labelwidget"&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; border: 0px;"&gt;'data': currentWidget.publishObj&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; border: 0px;"&gt;});&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; border: 0px;"&gt;this.publishData({&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; border: 0px;"&gt;'target':"Labelwidget"&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; border: 0px;"&gt;'data': currentWidget.publishObj&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff; border: 0px;"&gt;});&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #ff0000; border: 0px;"&gt;this.publishData({&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000; border: 0px;"&gt;'target':"searchwidget"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000; border: 0px;"&gt;'data': currentWidget.publishObjects&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000; border: 0px;"&gt;});&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;please check the above example ,if it is possible using publish data more than once in single widget please let me know&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2019 14:22:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-pass-the-data-from-one-widget-to-another/m-p/741095#M580</guid>
      <dc:creator>tarunvisvanadula1</dc:creator>
      <dc:date>2019-02-11T14:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass the data from one widget to another widget</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-pass-the-data-from-one-widget-to-another/m-p/741096#M581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tarun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Not sure why you would want to since your data property can be an object with multiple properties (i.e. and object that has multiple objects). As far as I know yes you can call publishData as much as you want though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Feb 2019 14:27:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-pass-the-data-from-one-widget-to-another/m-p/741096#M581</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-02-11T14:27:11Z</dc:date>
    </item>
  </channel>
</rss>

