Enhanced Search Widget Version 2.21.1 - 11/16/21

07-14-2014 03:57 PM
Labels (1)

Enhanced Search Widget Version 2.21.1 - 11/16/21

Live Preview Site

Web AppBuilder for ArcGIS | Help - Enhanced Search widget


List of the latest enhancements and changes:

  1. Added Max rows of 10 to all the widgets dropdowns.


Older enhancements or changes

Check the "Older enhancements or changes.txt" in the download for a complete list.


Older Versions

Last 2.17 version

Last 2.13 version

Last 2.12 version

Last 2.11 version

Last 2.9 version

Last 2.7 version

Last 2.6 version

Last 2.5 version

Labels (1)

Hi Robert,

I'm not having any luck yet. I removed the lines you said above and now the widget not working.

Any ideas?



   You got the lines off a bit. You only need to comment out these lines:

                  if (istest) {

that appear twice in that function.

Hi Robert,

I commented out the correct lines but I'm still not getting all the ownership names. One is still missing.


   Look at this query result. Notice that two results have the same OBJECTID!!!


Next weird thing with your service is the results of this query.

If you take these 1000 ObjectIDs which contains 201686 (which is OWN1="STEAMBOAT WHARF PROPERTIES LLC") and execute the query with a where of

gisdata.GISADMIN.Parcels.OBJECTID IN (203964,204026,204020,204066,204069,204500,203979,204027,204056,203985,204481,204562,204004,204277,204492,204389,204303,204442,204482,204388,203585,203469,203542,203597,203547,203679,203414,203496,203471,203781,203684,203660,203660,203586,203586,203936,203895,203544,203528,203131,203118,203167,203455,203455,203455,203455,203455,203455,203455,203455,203455,203060,203132,203100,203044,203306,203332,203334,203216,203164,202715,202715,202979,203133,203133,203133,203133,203133,203133,203133,203133,203133,203133,203133,203133,203272,202802,202908,203246,203097,203243,202714,203341,202810,203161,203300,203165,203492,203509,203529,203368,203516,203462,203631,215102,203966,203575,203655,203646,203754,203609,215098,203894,203436,203447,203453,203813,203837,203856,203911,203911,202685,203163,203042,203455,203455,203455,203455,203998,204073,204122,204070,204088,204033,204059,204474,204571,215097,204498,204441,204299,203504,203443,203530,203573,203764,203765,203783,203890,203607,203662,202874,203075,203455,203455,203455,203455,203455,203455,203455,203455,203455,203980,203762,203847,203751,203862,202867,202909,202944,203029,202700,202994,202712,202880,203084,203123,203036,203149,203188,203137,203235,202839,203117,203021,203054,203410,203416,203485,203485,203420,203438,203688,203681,203690,203906,203618,203970,203623,203616,203951,203927,203527,203535,203803,202755,202675,202706,202794,203013,203081,203455,203455,203455,203455,202765,202793,212696,203204,203274,202704,200822,200695,200314,200465,200655,200522,201002,200803,201037,200605,200627,198465,198170,198504,198506,198636,198564,198812,203455,203455,203455,203144,203168,202777,212695,202699,203182,203140,203079,203002,203133,201695,199381,198746,198902,199067,198915,198979,199103,199408,199253,198693,198745,198791,198773,199375,202383,202383,201903,202564,202465,206272,206006,201901,202049,201896,202650,201255,201609,201188,199185,199411,198847,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,201602,201402,202140,202141,202278,202037,202104,202432,202501,202610,201111,201359,201216,201712,201136,201235,201391,201415,201454,201723,201093,201565,201582,201648,201668,201762,201744,201509,201569,201574,201736,201686,201860,201794,201949,202135,201810,201857,202199,202332,202355,202434,202548,202608,202515,202417,201947,202066,202320,202389,202416,206093,206270,206151,206174,206196,206154,206124,205951,206226,206263,206255,206000,205948,205946,206005,206208,206220,206221,206035,206086,206134,205978,205995,205953,206056,206070,205964,205994,206015,206044,206058,205354,205453,205561,205573,205648,205575,205619,205564,205585,205736,205735,205739,205504,205577,205860,205674,205857,205852,205755,205907,205807,205888,205920,205802,205806,205389,205523,205944,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,199293,202820,203070,203050,203112,203102,202915,203150,203181,203133,203133,203133,203133,203038,203041,203041,203125,203303,203146,203177,202710,202834,202884,203133,203133,203133,203133,203133,203133,203133,203133,203133,203133,203133,203133,203356,203155,202723,203108,202961,202795,202840,202681,202681,202974,203026,203130,203083,202851,203153,203154,201383,201261,201518,202404,201906,202119,201944,202025,202954,201252,201487,201487,201256,201437,201541,201642,202061,202211,202260,202260,201981,202265,202625,199136,197682,197943,197901,196862,197026,197230,197029,204242,204151,204174,204198,204246,204115,204075,204155,204184,204255,204108,204191,204607,204339,204406,204516,204523,204383,204433,204499,204307,204542,204598,204489,204121,204180,204202,204181,204192,204165,204355,204609,204360,204519,204594,204553,204330,203961,204119,204105,204289,204001,203988,204304,204304,203962,204560,204563,204232,204238,204535,203487,203596,203440,203461,203525,203706,203806,203774,203770,203914,203963,202960,203148,203455,203455,201524,201724,201225,201433,201129,201213,201507,201198,202475,202128,202334,201905,202222,202270,203133,203133,203133,202729,202848,202861,202888,202956,203018,203101,203020,201399,201257,201462,201113,201548,201750,202522,202530,202578,202490,201554,201429,201180,201180,201484,201731,201176,202391,202177,202366,201760,202023,202178,201912,202084,202491,202617,202616,201687,201693,201693,201693,201693,201693,201693,201693,201784,202111,202139,201817,201776,202538,202595,206274,206127,205979,206066,205993,206117,206125,206106,206262,205958,206008,206089,205981,206012,202132,202226,202273,202479,202481,202481,202553,202636,201192,201612,201332,201392,201347,201749,201100,202275,202403,201885,202137,202276,202412,201881,202423,201868,202280,202568,202544,201309,201571,201708,201742,201468,201229,201353,201223,201323,201720,201180,201180,201176,201176,201466,201597,201681,201739,202207,201780,202028,202127,202174,201862,202418,202285,202285,202339,201770,201786,202013,202394,202045,202242,203455,203455,202934,203094,202936,203103,203375,203323,203266,203342,203342,203147,202718,202720,203133,203133,203133,203133,203247,203173,202919,203171,203139,203219,203252,202953,203077,203400,203562,203441,203465,203600,215103,203652,215101,203580,203603,215100,203460,203637,203736,203854,203810,203873,205382,205531,205630,205454,205665,205678,205812,205910,205417,205554,205666,205659,205622,205656,205795,205823,203133,202728,202736,202687,216697,202768,203016,203068,202850,202973,201356,201326,201178,203136,202807,202844,202788,202892,203379,202713,202693,202783,202846,202727,202745,202812,202886,202882,203424,201664,201664,201367,202054,202218,202296,202388,201830,202392,203887,203877,203455,203455,203455,203455,203455,203455,203455,202701,202991,203037,202824,202868,203129,202877,202967,203043,203059,203221,203312,203245,203133,203133,203133,203133,203133,202589,206118,206120,206139,205980,206179,206112,206009,206020,206159,206128,205983,206046,206144,206085,206099,206193,206202,206253,206252,205967,205956,206050,206064,206014,206107,206119,206042,205943,206027,206073,205387,205452,205503,205579,205595,205476,205589,205785,205841,205869,205775,205506,205654,205722,205792,205939,205892,205522,205650,205623,205849,205912,205932,205865,205836,205716,205885,205725,205343,205634,205642,205644,205732,205529,205529,205491,205530,205553,205714,205925,203133,203133,203133,202787,202985,203063,203091,203121,203121,202911,203014,201269,201620,201774,201692,203322,203322,202651,203023,203096,203128,203128,203205,203141,203145,202674,202654,202654,202697,202691,202845,202889,203051,202941,203110,203027,201159,202130,202357,201979,201880,202508,201815,201139,201552,201733,201135,202372,202196,202428,202220,202220,202510,212697,201105,202036,202031,202330,201990,202018,202345,202591,201308,201486,201190,201329,201480,201187,201274,201463,201185,201183,201327,201464,202059,205838,205764,205702,205935,205914,205879,205991,205314,205447,205334,205496,205649,205537,205890,205915,205783,205709,205738)

It returns 1000 results but not 201686!!!

There is some issue with your map service. I would contact esri tech support.

Thank you for looking into this and all your help!

I'll contact support now.


I am in need of help. In the results tab, is it possible to remove the options "Pan to", "Flash", "Save To My Content" and "Statistics"?

Another issue is that I need to include two date fields in the widget, that is, the start date and the end date. These fields will not perform any filter on the map. I'll just need to use them to later generate an excel spreadsheet using an external application made in C #. This is another thing that I need to check how to get the results array.

If you can help me, I will be grateful.

Thank you!


  In the widget.js find the _setPopupMenuItems function and modify the 

          actions = array.filter(actionslang.hitch(thisfunction(action){
            // console.info(action.name);
            return action.name !== 'CreateLayer' && action.name !== 'ShowStatistics' && action.name !== 'ExportToCSV' &&
            action.name !== 'ZoomTo';
            //&& action.label !== 'Save to My Content'

by adding the labels of the ones you want to eliminate (&& action.label !== 'Save to My Content' && action.label !=='Pan to'. etc, etc)

As far as providing help with the date fields for your external app, sorry I don't have time for that.

Thank you for your help. 
Worked perfectly. 
I just need to find out where the results are stored, so I can take one of the attributes and pass it to my ASP.NET C # 
application.   Hug, Gilberto.


   The results are in the this.currentSearchLayer (which is a FeatureLayer or GraphicsLayer).

Hello!  Robert, I debugged it with google chrome, and I was able to check the place where 
I could insert what I needed. Follow below:

In the '_onSearchFinish' function of the widget.js file

for (i = 0; i < len; i++) {

          var featureAttributes = results.features.attributes;
          sListaCodigosEstacoes += "'" + featureAttributes["myAttribute"] + "',"; //variable with content i need



Hi Robert,


I have good news!


The new release of the Developer Edition of the Web AppBuilder 2.16 (April 2020) did not break any of your Custom Widgets.


All your Custom Widgets are working flawlessly.


I updated the Parcel Map to test out everything:





The only change I had to do was edit the manifest.json file under each widget and change the wabVersion to 2.16


  "wabVersion": "2.16",




This is using the latest versions of your Custom Widgets and a couple by Kevin MacLeod:


Enhanced Search Widget 2.13, Version 85               9/25/2019




Enhanced Basemap Gallery Widget 2.8, Version 18                        5/1/2018




Identify Widget 2.14, Version 38                   11/26/2019




Elevation Profile Widget 2.14, Version 23                12/3/2019




Map Progress Indicator Widget 2.14, Version 12     11/26/2019




Enhanced Bookmark Widget 2.5, Version 8             8/17/2017




Enhanced Locate Widget, Version 18           11/5/2018




Popup Panel Widget 2.13, Version 25          10/25/2019




Pictometry Widget for ESRI WebApp Builder 1.2 (Kevin MacLeod)                        10/27/2015




Google Earth Widget (Kevin MacLeod)




The Web Development Team did a terrific job with WAB 2.16.


I am excited about the next generation Web AppBuilder – the new Experience Builder Platform built upon JavaScript 4.x.


This has the potential to revolutionize the way we build complete websites just the way the Web AppBuilder has forever changed the way we design Web Apps.


I posted a Blog with a detailed step-by-step Tutorial on how to design a website using the Developer Edition of the ArcGIS Experience Builder:




This is how the finished website will look like:





The Developer Edition of ExB is necessary to add Custom Widgets.


I added a chapter at the end of the tutorial discussing the Evolution of the Experience Builder.


It was Moxie Zhang’s vision to make it easy for non-programmers to design Web Apps which led to the original ArcGIS Viewer for FLEX.


You took the FlexViewer to dizzying heights with your set of Custom Widgets. The most popular widget ever designed for the FlexViewer was your original Enhanced Search Widget.


Moxie’s team then came up with the ArcGIS Web AppBuilder platform based on JavaScript 3.x.


It was a monumental effort on your part to transfer all your Flex Code into JavaScript and keep all your Custom Widgets alive for us.


Your efforts have forever changed the landscape of Web App Design.


This has been long journey. This has saved us thousands of hours of our programming time.


The new Experience Builder based on JavaScript 4.x opens up a whole new frontier. It offers seamless switching between 2D and 3D views. The platform is built Mobile First.


Everything gracefully collapses to fit your Smartphone.


I can hardly wait to test out your Custom Widgets for ExB as you release them in the future!


On behalf of our Web Development Community I would like to say a big THANK YOU to you, Moxie and the rest of the Team.


Best regards,


David Das

Is it possible to navigate among components, such as Search Layer drop-down list box, Search text box, and Search button, by using TAB key? 


   I have spent some time looking into this but have yet to make it work. So answer is no.


Thank you for your quick response. 

Robert Scheitlin, GISP

Thank you so much for sharing this widget.

I used the code as a starting point and would like to modify it a little bit further.

Is it possible to add a sign in option as the first thing that the user sees when they open this widget?

The idea is to use this widget to share secure data on a public app.A subset of the users would search this data after signing in.
The widget would also be publicly shared but wont show any of its tabs until the user has signed in using their ArcGIS enterprise credentials. 

I tried to secure this widget through portal groups but as soon as I added it to the public app and reloaded it, the login credentials were required.

I also attempted to integrate this code from ArcGIS API for JS 4.12 but was unsuccessful.

I wish the apps built through web appBuilder could separate the security of layers,widgets and the app itself.

Where a prompt to login only pops-up when the user turns on the secured layer or attempts to open a secured widget.

Any suggestions would be highly appreciated.

This is a big task and not something I can provide help with. BTW you can not integrate 4.x code in WAB 2D app as it use the JS 3.x API.

Good afternoon!

First of all, congratulations on the widget. Very well written and helped me a lot.

I have only one doubt: is there any way to include in the common text fields, a style of auto-complete, that is, depending on what the user is typing, to suggest the possibilities?

Thank you!


No there is no support for suggestions for text fields.

I can't seem to get the widget to use the popup from the Web Map. It will only use the popup from the eSearch config. I'm using the latest versions of both the Dev Edition (2.16) and the eSearch widget (2,13). Has anyone else had the same issue?

I'm trying to replicate the functionality of the Flex esearch widget for an owner mailing list application that people in my org are still using (but in need of an upgrade). I've looked into a few different options including the Public Notification widget but e-search is still the best for its speed and functionality. I have a  few questions that I can't seem to figure out.

The workflow is that the user selects a property (by attribute or by graphic) and then creates a buffer from the property to select from the buffer graphic.Then they export the results to csv.

To make the process simple, I would like to disable the Results tab from automatically opening every time a search is completed. The user can open it manually when they are finished selecting a property and applying the buffer.

Is there a way to disable the Results tab from auto opening after a search?

Also in the By Spatial tab, is there a way to disable the pop-up that says 'Do you want to use the Buffer Graphics or the Selection Graphics?' and instead choose Buffer graphics by default?

None of these are essential, but would help in making the application simpler for the average user.

Thanks so much!


   Nope not seeing that issue.


   So both of those will take code modifications. In the Widget.js

Search for 

        if (this.rsltsTab) {

And comment out those lines (should find this code block twice).

For the spatial message make this change:

      _intersectResults: function (dataSpatialType) {
        this.garr = [];
        var intersectGeom;
        if (this.graphicsLayerBuffer && this.graphicsLayerBuffer.graphics.length > 0 && this.currentLayerAdded && this.currentLayerAdded.graphics.length > 0) {
          // var qMessage = new Message({
          //   type: 'question',
          //   titleLabel: this.nls.spatialchoicetitle,
          //   message: this.nls.spatialchoicemsg,
          //   buttons: [{
          //     label: this.nls.buffergraphics,
          //     onClick: lang.hitch(this, lang.hitch(this, function () {
          //       qMessage.close();
                var g = this.graphicsLayerBuffer.graphics[0];
                intersectGeom = g.geometry;
                this.search(intersectGeom, this.spatialLayerIndex, null, null, dataSpatialType);
          //     }))
          //   }, {
          //     label: this.nls.selectiongraphics,
          //     onClick: lang.hitch(this, lang.hitch(this, function () {
          //       qMessage.close();
          //       intersectGeom = this.unionGeoms(this.currentLayerAdded.graphics);
          //       this.search(intersectGeom, this.spatialLayerIndex, null, null, dataSpatialType);
          //     }))
          //   }]
          // });

Thanks Robert. That worked perfectly!

Hi Robert-

I have tried searching this thread and the help doc for the widget, but I am not finding anything... I am wondering if instead of the results tab being displayed after a search, the summary popup could be displayed automatically after the search (instead of having to click the "more..." option on the bottom of the results window. I am basically trying to get a summary window/popup on several fields by using a graphical search. 


   Sorry I have not attempted that. That sort of customization is up to you.

Sounds good, Thanks

Hi Robert -- I'm having a hard time finding the spot in the code that controls which tab in the eSearch widget opens by default. I'd like to change the default so that it opens to the By Shape tab instead of the By Value tab. Can you point me in the right direction, please?


   that is configurable in the widgets general settings dialog (Initial View).

Maybe this has been asked already and I couldn't find it, but is there a way to include the search results in the attribute table, but not have the attribute table open automatically? I would like the user to have the option to view the attribute table at their discretion. Thanks


   No there is no option to have it add the results to the AT widget but not open the AT widget automatically.

Thanks Robert. Do you know of a way to accomplish this programmaticly?


   Not that I know of. The widget opens the AT widget then calls the _openResultInAttributeTable method. Using this line in the _drawResults method:

this.attWidget._openTable().then(lang.hitch(this, this._openResultInAttributeTable, currentLayer));

Even if I comment out the opening of the AT Widget,when I publish the data (the layer info) to the AT Widget it automatically open the widget.

Yes, I tried changing some code in that method as well with no luck. When I comment out your above method, it forces the attribute table to stay closed, but then when I do open it after a search, it is empty. Oh well. Thanks for checking it out. 

I realized that I could just leave the code as is so it functions as designed and then call the 


after the _openResultInAttributeTable method. So it ends up looking like this:

this.zoomAttempt = 0;
        if (layerConfig.shareResult && layerConfig.addToAttrib) {
            this.attTableOpenedbySearch = !this.attWidget.showing;
            this.attWidget._openTable().then(lang.hitch(this, this._openResultInAttributeTable, currentLayer));

This seems to get the job done. As long as the AT widget is configured to NOT filter results by the map extent, the search returns the results in the map without the AT automatically opening, but if the user wants to see the results in the AT, they are there once it opens. 

Robert, I'm having an issue with the configuration of the eSearch widget. Everything is working fine, but I've been asked to add two different projections to the list of options. When I open the window to add in a new WKID, the value that I enter in that first box disappears as soon as I tab or click outside of the WKID box. The same thing happens if I open the window for an existing projection in the widget -- the window is empty when it opens and my data entry in the blanks do not persist. I fear that my tinkering in the configs\eLocate\config_widgets_eLocate_Widget_21 file has caused this issue. Are you seeing any issues with your version of the widget?


  You posted this question to the wrong widget thread. But the issue is here


There has been a syntax error is WAB wkidDetails.json since 2.14 that has yet to be fixed.

Robert, how would I go about completely removing the tooltip from the eSearch?

Never mind  I can just take it out in the CSS

.map .esriMapTooltip {
   display: none !important;

I'm using WAB 2.16 and this Widget 2.13 but I am unable to get the default symbology to change is this still a known issue?

Still...? I don't recall it being an issue.

Oh, I assumed

3. Fixed issue with result list selected record color.

was somehow related to that.

I tried manually changing the colors in the config, but it still produces grey

Seems to be Polygon Symbol is locked for me.


   So there are three options for symbology in the eSearch widgets settings.

  1. From Server
  2. From Defaults
  3. From Layer

Which have you configured?

BTW, there should be no need to manually edit the widget config as I have settings dialogs for everything.

From Defaults

I guess the easy way is to switch to layer and edit it there, following the choices

I just tested and From defaults worked fine for me.

Setting a search layer symbology is covered here in the online help documentation.


After choosing from layer be sure to click the Add\Edit Layer Specific Symoblogy Link


   Not sure what you are asking. I am not aware of any "filter a category of results" ability in the query widget.

I upgraded to the 2.13 Widget with 2.16 WAB and now the search doesn't work correctly anymore.

Old correct way:

SQL Where with layers definition expression: Upper(OWNER) LIKE Upper('%Fei%') AND Upper(OWNER) LIKE Upper('%Fei%') AND Upper(OWNER) LIKE Upper('%Marok%') AND Upper(PARID) LIKE Upper('%%') AND Upper(PARCEL_ADDR) LIKE Upper('%%') AND Upper(LEGAL) LIKE Upper('%%') Widget.js:2156:19

New Incorrect:

SQL Where with layers definition expression: Upper(OWNER) LIKE Upper('%Fei Fei Marok%') Widget.js:2516:19

Can't figure out what I doing wrong again.


   There is a configuration setting for that. "String search that uses contains will search for each word separately in query"


Stupid me, I didn't think to even look at General Settings. TY

But that just turned the first box into a OR phrase not an AND with all fields

SQL Where with layers definition expression: Upper(OWNER) LIKE Upper('%Fei%') OR Upper(OWNER) LIKE Upper('%Fei%') OR Upper(OWNER) LIKE Upper('%Marok%') Widget.js:2516:19

So I still missing something obvious?

I did find the line to change the OR to and AND in the widget. js, to fix that issue for a single box, but why am I setting the rest of the boxes in my widget disconnected from the first field?

Hi Robert-

I am trying to figure out where the code lives for the popup menu in the Results tab (see attachment). I would like to accomplish 2 things.

1. Change the name of a menu item in the popup menu. Typically I would look in the strings.js file for those changes, but I realize they are not found there for this menu. And,

2. Delete one of the popup menu options from showing up (would like to not have "Save to my Content" as an option at all). I have accomplished removals like this in the past using a rule in the widgets html file, but again, i am lost as to where the code for this popup menu comes from.

Any help would be appreciated. 



1. The strings that can not be found in the nls/strings.js file are going to be part of the JS API then.

Here is a thread where I explain how to change strings in the popup that come from the JS API:



2. See the answer to this here: https://community.esri.com/t5/web-appbuilder-custom-widgets/enhanced-search-widget-version-2-17-12-1...


Version history
Revision #:
7 of 7
Last update:
‎11-16-2021 06:12 AM
Updated by: