Enhanced Search Widget Version 2.17 - 12/11/20

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

Enhanced Search Widget Version 2.17 - 12/11/20

Live Preview Site

Web AppBuilder for ArcGIS | Help - Enhanced Search widget


List of the latest enhancements and changes:

  1. Fixed Issue with Print Legend using "override 1" for search and/or buffer Layers.
  2. Fixed autozoom issue under certain configurations.


Older enhancements or changes

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


Older Versions

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)

Thanks for being helpful as ever, Robert. I have not done any customisation. Maybe I will try with a fresh copy of the 2.3 version of the widget.

I am sorry if I did not express the checkbox requirement clearly. In fact, my customer does not want that checkbox to appear there at all.

Thanks and regards,


Sent from my iPhone


  Then you have to add this css rule to the widgets css/style.css file:

.jimu-r-row.play-section .col-2-3 {
  display: none;

Hi Robert,

I am printing the results of eSearch done on a layer called "Final Plots" on a custom layout format in PDF. The legend prints the title as "Search Results for Final Plot" followed by Override 1. Is there any way I can do away with these two? The Override 1, I understand is a known Esri Bug which may have been solved at 6.1.

No not that I know of.

Even the “Search Results for Final Plot” title can’t be removed or hidden?



Sent from my iPhone

Correct. There may be a way but I don't know it.

Found a very curious solution to this problem. I was adding the search result as operational layer in eSearch. For trial’s sake, decided against, and it worked!!! I am neither getting “Search Results: Final Plot” as a title in legend and even Override 1 has disappeared.

Thanks and regards,


Sent from my iPhone

The eSearch has to be open at startup to execute its search from a URL, is that right?  

So, if a user goes to a URL such as https://cloud.sagis.org/sagisnext/?esearch=2-0044%20-12-002&slayer=0&exprnum=2  the eSearch has to be open?

(the background.. I had eSearch open at startup initially. But I was requested to have users use the Esri WAB Search so as to be simpler. So it is still there but not open by default. In the long term I'm looking at ways of making the Esri Search widget auto complete and zoom to an address. I'm still working on making it go automatically. It works , but if used in conjunction with auto-complete does not click the correct parcel. (from your code here & here.) I had to disable auto complete on our locators because of the 'ghost address' bug that does not appear will be fixed anytime soon. This is the next revision of the site I am working on, without autocomplete and the Esri locator removed, as Suggest can't be disabled on the Esri locator service, until they implement that as an option. For 1.1 or thereafter I hope to add locating and feature popup back but for now it will require the user clicking the result, due to the auto-complete bug.)

Similarly, I wanted to have URL search parameters with eSearch available for some scenarios, but I didn't want to open the widget on the initial app load.  Our preference was to have the Layer List or no widget at all display initially.  My solution was to use the URL parameter that loads the app with an alternate config, which would be setup to load eSearch at start.  Here's how it would look:


I also like that you can add &close=true in case you want to simply want to zoom to a search result and not display any additional content.

I am having an issue performing queries with the Enhanced Search Widget version 2.9. Normally, the widget does not apply blank search boxes towards the query. However, I have found this only applies when the field being searched is a string. If the field being searched is an integer, a NULL value is applied instead of the search box being ignored. This returns results matching conditions where that value is NULL instead of returning results with no search conditions as intended. 


Example 1: 

I have Street Name as a String (Upper(Street_Name) LIKE Upper('%[value]%')). If the box is left blank, all streets will be returned as results because I have not specified any search conditions.


Example 2:

I have a SegmentID as an Integer (SegmentID = [value]).  If the SegmentID box is left blank, all streets with a missing / NULL SegmentID will be returned, rather than just ignoring the SegmentID box instead. Streets with a valid SegmentID are excluded because the query is looking for NULL values. If the records table has no NULL values, then no records are returned, as none of them would match the search conditions.


Is there a way to fix this issue?

Thank you in advance,



   In the Widget.js find the buildWhereClause method and this line:

} else if (content[s].value.toString().toLowerCase() === "null" || content[s].value.toString().toLowerCase() === "nan"){‍‍
//Change in 2.9 to see if we can allow null values back in the the unique dropdown
//if (content.isValueRequired === true){
var mExpr2 = queryExpr.substr(0, queryExpr.indexOf("=")) + "is null";
expr = this.AppendTo(expr, mExpr2, tOperator);
} else {
//don't add the expression if there is no user input
if (eVal !== "") {
criteriaFromValue = queryExpr.replace(myPattern, eVal);
expr = this.AppendTo(expr, criteriaFromValue, tOperator);

and change it to:

} else if (content[s].value.toString().toLowerCase() === "null"){
//|| content.value.toString().toLowerCase() === "nan"
//Change in 2.9 to see if we can allow null values back in the the unique dropdown
//if (content.isValueRequired === true){
var mExpr2 = queryExpr.substr(0, queryExpr.indexOf("=")) + "is null";
expr = this.AppendTo(expr, mExpr2, tOperator);
} else {
//don't add the expression if there is no user input
if (eVal !== "" && content[s].value.toString().toLowerCase() !== "nan") {
criteriaFromValue = queryExpr.replace(myPattern, eVal);
expr = this.AppendTo(expr, criteriaFromValue, tOperator);

That fixed it Robert! Thanks 🙂

Ryan KelsoKelso‌ awesome, that is perfect. Thanks!


    First, the Enhanced Search Widget is great! I have been using it for a long time now. We have recently changed the way we add in your custom widgets now to our web applications. Before, I would use Web App Builder Developers Edition and host the web apps from our web server. There, I would manually update the custom widget code to meet our needs using notepad++ or another text editor. This worked well. We have now moved to hosting the customized widgets through ArcGIS Portal by adding an Application Extension (AppBuilder) and directing the URL to the manifest.json file. Most of your custom widgets work well. We have ran into an issue with the Enhanced Search Widget though. Now, when building a Web Application through WAB, our default Theme is "foldable". The widget works well under this theme. As soon as the theme is changed, the widget breaks. I also cannot add the widget under a different theme. Any help resolving this issue would be greatly appreciated and again, thanks a lot for all the work you do.

Ryan Jones


   I do not use portal so I will not be able to help much. One thing to consider is that Portals WAB version is always behind in versions so you need to be sure to get the right version of the eSearch widget. See the link below to determine which version of WAB coorispond with your Portal version.

About release versions—Portal for ArcGIS | ArcGIS Enterprise 

Robert you nailed it! I was using version 2.9 of the widget. Since we have Portal 10.6, I needed version 2.7 of the widget. It now works with any theme. Thanks again!

Robert Scheitlin, GISP

Is there a way that your latest version of the eSearch widget can set an expression similar to the query widget for "is any of" so that the users can select multiple values?

Thank you in advance,


Nope, I have not added that ability.

I did find somewhat of a workaround.

In the .json file here:


I was able to manipulate the SQL to add multiple values, instead of just one, using the "In" expression. The user just has to enter the multiple values (comma separated) into the search box and it will search across all values.

"prompt": "CrimeClass in",
"textsearchhint": "You can copy and paste 1 or more of these commma seperated values directly into the box and then hit search: Aggravated Assault,All Other Offenses,Arson,Auto Theft,Burglary,DUI,Embezzlement,Fraud,Graffiti,Homicide,Hospital Cases,Investigations,Lost and Found,Minor Disturbances, Miscellaneous,Missing Persons,Narcotics,Offenses Against Family,Other Assaults,Pedestrian Investigation,Rape,Receiving Stolen Property,Robbery,Theft,Truancy,Unfounded,Vandalism,Vehicle Accidents,Vehicle Investigation",
"sqltext": "CrimeClass IN ('[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]''[value]')",
"operation": "stringOperatorIn"


  I will have to look at snatching the multiselect dorpdown functionality from the Query widget to add to the eSearch in a future release.

That would be a great addition!

Thanks Again Robert. always putting out quality work. I do have a question however. I am trying to change the SQL expression within the widget from the default from my data set which is

Upper(PID) = Upper('[value]') 

to what i feel is a little better query for our purpose  of

PID Like '[Value]%'

the text is un-editable within the in app configuration through WAB. could you possibly point me to where i can change the query/expression. I've been digging through the code and cant seem to find it.

Thanks for your help!

Michael D


  Then when configuring the expression you have to choose "Starts with" instead of "Equals"

worked like a charm think you sir

Robert, We have been using this widget for our Parcel Viewer and it seems like we are now having troubles with any queries that use the "Contains" filter. This used to work just fine before but now the widget requires the exact search in the box which is not what we want. For example, in our old app we have with an older version of the Enhanced Search widget, if you typed in "175 Main" it would pull up our County building which is 175 S Main. However, in our new Enhanced Search, when we type "175 Main" in as a Street Address query it does not return any results and will only find it if you have typed it in exactly even though I made sure the query was built using the "Contains" filter. Is there something that needs fixed on my end that might be causing this not to work?

Our public viewer is at this URL: ArcGIS Web Application .. the Search Layer is Parcels and the Search Alias is Street Address

This old application: ArcGIS Web Application  uses the same logic except this one works



It looks like the query in the old version handles the street number and the street name separately:


the new version has it as one:



  It looks like you need to configure the eSearch in the new version to search each word separately like it did in the old version.

Go to the widgets settings and choose the "Edit General Settings" link at the bottom and check "String search that use contains will search for each word seperately in query". Simple fix.


  As you can see from my reply to Carissa, that is configurable in the widgets settings.

Okay, I see! Thank you very much!



Excellent widget and my hats off to you for this extremely helpful tool. 

I have one question about related tables and how they show up in the popup.  When I configure the eSearch to "Use Popup from" the "Web Map" it doesn't show the related tables links at the bottom of the popup.  I know I can configure the eSearch popup to show these related records but the department I am developing this solution for much prefers the ability to see a related tables link at the bottom of the popup instead of having to click on the ellipsis and selecting "Show Relates" like you do when using the eSearch popup.  

Am I configuring something wrong or is there any way to have the Related Tables link show up on the eSearch popup?  Any help would be much appreciated! 


   There is no way currently to show the related tables link in the eSearch popup like it does in a standard popup.

Thank you for the definitive answer and quick reply.  Much appreciated!

Hi Robert,


Good news!


All your Custom Widgets are working fine in the new version of the Web AppBuilder Developer Edition 2.11 (January 2019).




I just downloaded WAB 2.11 and tried the following Custom Widgets on the Foldable Theme.


Enhanced Search Widget 2.9, Version 80                 10/3/2018




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




Identify Widget, Version 33                          8/31/2018




Elevation Profile Widget 2.8, Version 19                             7/23/2018




Map Progress Indicator Widget 2.8, Version 11                   7/23/2018




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




Enhanced Locate Widget, Version 18                                   11/5/2018





Popup Panel Widget 2.9, Version 17                         8/1/2018




Here is our Parcel Map using all the above Custom Widgets in WAB 2.11







ESRI has done a terrific job with WAB 2.11

This is a solid release!

It did not break any of your Custom Widgets.


I just found a minor cosmetic anomaly with the Identify Widget


The Result Attribute Value color is not green!


It is showing as gray inside the Identify Results panel.


The popup shows the correct color scheme.



The Popup Panel also shows the correct color scheme.



This is how I have formatted my Results in the Identify Widget




Here is the resultFormat section within Config.json for the Identify widget.





The zipped app is under:





You have made such an awesome collection of useful widgets. I include them in all our Web Apps.


I ended up writing a 400-page User Guide explaining how to use your powerful widgets.



Looking forward to see you at the ESRI Dev Summit on Feb 5th.



Best regards,


David Das


   Thanks for informing me. I will be releasing a 2.11 version with this fixed today. Also a 2.11 version of eSearch with a minor bug fix and automatic hyperlinking of urls in the attributes.

Hi Robert,

Thanks for your superfast response!

Automatic Hyperlinking will be a wonderful enhancement.

Your Enhanced Search Widget is a masterpiece!

This widget is the cornerstone of all my Web Apps.

Looking forward to testing out your version 2.11 widgets.

Best regards,


Hi Robert,

I just tested out the new version 2.11 of your Identify Widget.

The Result Formatting issue is now fixed. It is working flawlessly.

You are faster than the wind!

I will now try out your new Enhanced Search Widget 2.11

Best regards,


Hi Robert,

I tried out your new Enhanced Search Widget 2.11

When I click OK on the Configure Enhanced Search Panel, it does not go away.

I will try starting off with a brand new Web App and see what happens.


Hi Robert,

I created a brand new Web App.

I added your Enhanced Search Widget 2.11

When I go to edit the Configuration, I see your standard 3 example data layers.

When I press OK, this panel does not close.

The Cancel button works.

It closes the panel.

However the eSearch Widget is not added to the Web App.



   Can you show me the errors you have in the browsers console?

Hi Robert,

Yes, absolutely!

I am using Firefox as my browser.

When I open the new Web AppBuilder App, it loads clean with no errors like this:

Then when I add the Enhanced Search Widget 2.11 I get this error message the moment I press the OK button:



   I am really having a hard time try to re-produce this. In my 2.11 WAB that I developed in I could not reproduce it. So I downloaded 2.11 again and installed in a new folder and downloaded eSearch widget from GeoNet and used that download in my clean WAB 2.11 and still could not produce the error.

Hi Robert,

Thanks for taking your time to verify that everything is working perfectly at your end.

I will try creating a brand new Web App on my home computer and just add your Enhanced Search Widget version 2.11.

I will try both Chrome and Firefox and let you know my results.


Hi Robert,


Here is what I did to reproduce the problem on both Firefox and Chrome Web browsers.


I ran the tests on my home PC where I do not have to negotiate the Organization Proxy issues.


I unzipped Web AppBuilder version 2.11 on my D drive.


Test #1 - Using Firefox:


I ran startup.bat to launch Node.js



I added the eSearch folder to D:\WAB\WAB106\client\stemapp\widgets


eSearch was successfully inserted.



I launched Firefox and entered:




I entered the Portal URL = http://maricopa.maps.arcgis.com

I entered the appID


I created a brand new Web App using the default 2D Theme.



I opened Developer Tools and found no errors.



Add an In-Panel Widget



Add the Enhanced Search Widget



Click OK in the Configure Window.



I get this error message:


Cross-Origin Request Blocked.

TypeError: “widgetJson.manifest…






Test #2 - Using Chrome:



Launch Chrome and enter:





Set Portal URL = http://maricopa.maps.arcgis.com

Enter AppID


Create a brand new 2D App



Open Developer Tools – Console Window


No errors



Add the Enhanced Search Widget 2.11



Click OK on the Configure Panel.


The Panel does not close.


I get this error message in the console window.




I must be doing something wrong.


Hi Robert,


I found the same issue while trying to add Identify 2.11


Web Browser = Chrome

Open a brand new Web App



Add the Identify 2.11 Widget




Click OK on the Configure Identify Panel.




The Configure Identify Window does not close.


The Console Window shows this error message:




I have a feeling that if I clear out all the preconfigured layers, it may just work.




Hi Robert,


Deleting all the layers did not help.


I deleted all the layers



Now everything is gone.


Click OK on the Configure Identify Window.

The window does not go away.



I get this error message from the Console Window


Uncaught TypeError: Cannot read property 'en-us' of undefined





Hi Robert,


Deleting all the layers in the Enhanced Search Widget 2.11 did not help either.


I deleted all the layers


All layers have been removed



Click OK on the Configure Enhanced Search Window. 

The window does not close.


I get a different error message from the Console Window


Uncaught ReferenceError: Deferred is not defined





Hi Robert,

I think something is messed up at my end. Let me investigate this.

Please do not waste anymore time on your custom widgets.

I don't think my issues are related to your custom widgets. It could be  that some settings may be have been changed on our servers.


Hi Robert,



All of a sudden everything appears to be working perfectly today in WAB 2.11

There was nothing wrong with your Enhanced Search Widget 2.11.


I am not getting any more console errors.


These are the steps I followed.



Add eSearch 2.11 into the widgets folder:






Run startup.bat to launch Node.js





Launch Firefox







Create New Web App



Select Default (2D) Template




Open Web Console




Add the Extent Navigation Widget



Web Console - ExtentNavigate Widget is added




Add the Enhanced Search Widget 2.11



Select eSearch 2.11




This opens the Configure Enhanced Search window


Press OK


Window closes.




eSearch 2.11 is added





Console View shows no errors.



Everything is ok.



I have no clue why these exact same steps did not work over the weekend.



Anyway, we are golden!



Sorry for taking up your time.


Best regards,



Hi Robert,


Our Parcel Map is working flawlessly with your Enhanced Search Widget 2.11 and Identify Widget 2.11 inside Web AppBuilder version 2.11

I have tested the new version.





We are back in business!


Best regards,



I cannot find these Voting Locations to place a point.

Please confirm with a GIS screen shot of the actual building, address number



Version history
Revision #:
4 of 4
Last update:
‎12-22-2020 09:34 AM
Updated by: