<?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: Javascript Search Widget (searchWidget.sources.push(sources)) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677024#M63117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've constructed my own search sources like this in the past:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;sources = &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;searchWidget&lt;/SPAN&gt;.get("sources");
sources.push(newsourceobject); //push for adding at the end of the list and unshift to add at the front of the list
&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;searchWidget&lt;/SPAN&gt;.set("sources", sources);
&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;searchWidget.startup();&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 04:31:46 GMT</pubDate>
    <dc:creator>FC_Basson</dc:creator>
    <dc:date>2021-12-12T04:31:46Z</dc:date>
    <item>
      <title>Javascript Search Widget (searchWidget.sources.push(sources))</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677019#M63112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="hljs-comment"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hljs-comment"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Just would like to confirm that, the search widget is pushing search layer at right level or not ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hljs-comment"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hljs-comment"&gt;because when i try to push a source then it gets added in wrong heirchical level.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hljs-comment"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hljs-comment"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hljs-comment"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hljs-comment"&gt;var sources = [ { declare only one source } ]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hljs-comment"&gt;// Add to source(s)&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="hljs-keyword"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; searchWidget = &lt;/SPAN&gt;&lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; Search();&lt;BR /&gt;searchWidget.sources.push(sources);&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="hljs-comment"&gt;//new source&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;searchWidget.startup();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then it shows heirchy like &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;items&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [1]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [0] and here is my source (underneath of [1][0])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I believe my source should be at [1] level of heirchy.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please correct me if i am missing anything.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 11:49:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677019#M63112</guid>
      <dc:creator>SachinTiwari</dc:creator>
      <dc:date>2016-05-23T11:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Search Widget (searchWidget.sources.push(sources))</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677020#M63113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="searchwidget.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/201691_searchwidget.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 11:51:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677020#M63113</guid>
      <dc:creator>SachinTiwari</dc:creator>
      <dc:date>2016-05-23T11:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Search Widget (searchWidget.sources.push(sources))</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677021#M63114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if the heirchical level is correct then why i m not able to search on added (pushed) sources, whereas when i add the same source at the constructor level of Search() widget then it works perfectly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 12:02:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677021#M63114</guid>
      <dc:creator>SachinTiwari</dc:creator>
      <dc:date>2016-05-23T12:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Search Widget (searchWidget.sources.push(sources))</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677022#M63115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are adding an array and not a source object.&amp;nbsp; Just remove the square brackets from your sources variable declaration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 12:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677022#M63115</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-05-23T12:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Search Widget (searchWidget.sources.push(sources))</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677023#M63116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the solution. (Heirchical level is solved by your response but search issue is still remains)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the issue remains the same, when i tried to push a source then it won't search on pushed source. and when i assign the same code in the constructor of search() widget then it searches perfectly. I think i am lacking somewhere, let me check once again. or if you have any other clue on that ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 12:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677023#M63116</guid>
      <dc:creator>SachinTiwari</dc:creator>
      <dc:date>2016-05-23T12:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Search Widget (searchWidget.sources.push(sources))</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677024#M63117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've constructed my own search sources like this in the past:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;sources = &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;searchWidget&lt;/SPAN&gt;.get("sources");
sources.push(newsourceobject); //push for adding at the end of the list and unshift to add at the front of the list
&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;searchWidget&lt;/SPAN&gt;.set("sources", sources);
&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;searchWidget.startup();&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:31:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677024#M63117</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2021-12-12T04:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Search Widget (searchWidget.sources.push(sources))</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677025#M63118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;other way around &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 12:31:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677025#M63118</guid>
      <dc:creator>SachinTiwari</dc:creator>
      <dc:date>2016-05-23T12:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript Search Widget (searchWidget.sources.push(sources))</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677026#M63119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mean the push/unshift? I'm pretty sure. &lt;A href="http://www.w3schools.com/jsref/jsref_unshift.asp" title="http://www.w3schools.com/jsref/jsref_unshift.asp"&gt;JavaScript Array unshift() Method&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 12:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-search-widget-searchwidget-sources-push/m-p/677026#M63119</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-05-23T12:34:34Z</dc:date>
    </item>
  </channel>
</rss>

