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,

Any chance of making the eSearch widget available on a mobile device?


   All version of the eSearch are mobile ready.

Hi Robert,

Let me first say thank you for all the wonderful widgets and work you have done.

I’m using your eSearch widget in my web app and it working great. The only complaints I’m getting is the speed of the widget loading Unique Values. Can you check out my site below and give any tips on ways to speed it up.




  Version 2.9 of the eSearch greatly improved that performance. Update your site to 2.9 or greater.

Hi Robert,

Now that I've updated everything to 2.11 (eSearch and WAB) the "Unique" values won't load up. I'm currently working in developer site not the live site above. Suggestions on why this might be happening?

Do you see any error in the browsers web console?

What I see... No error codes are coming up. The widget won't load and is blank.


   Strange. It seems like it is mis-configured then. Can you attach your eSearch config file (you have to use the advanced editor to attach files) from your apps configs/eSearch/config__5.json (config__5.json is an example of the file, your may have another number)?

Hi Robert,

I have no clue how to post a files on this site, so I made a pdf of the full eSearch code. Let me know if you have issues with the link.

eSearch Code


   Hmm. something is not working in your map service. When going to this url:

Query: Address PTS (ID: 0) 

it should return the distinct values for the address field but it is returning zero results. Because you map service is not acting right the eSearch can not help but show what the map service is returning "Zero" results. When I submit a query to my map service (like the above url) it works fine returning the distinct results. You need to give tech support a call and provide them the above link and ask them why this query is failing on the map service when set to return distinct values.

Thanks Robert! 

I'll contact support now.

Hi Robert,

I want to have the webmap popup show up along with eSearch results when you click the Search button. How can I do this?  I have some custom logic and css configured for the webmap popup and it would be great if users would be able to see it as soon as they perform a search.

Thank You.

Good Afternoon,

I am using an older version of the E search widget as we are still running arc server 10.22 (upgrading next month) but there seems to be a bug in whichever version of the widget that we are using where the default search type is set to by shape even  when in the configuration of the widget it is set to by value. I'm not sure how to fix it and thought maybe an updated version of with widget may have addressed this. However, I wanted to know if there were certain releases of the widget that may not be compatible for us because we are running server 10.22. Any help would be greatly appreciated.



Michael,  I don't remember that particular error but I know that is does not exist in later versions. ArcGIS Server 10.22 if fine with any version of eSearch. So it depends on the version of WAB you have or will update to.

I cannot get the Show Relates to do anything.  I think I set it up correctly just nothing happens when I click on it.

What I really was hoping to do is map all the Features that have a certain value in a related Table.  So I am searching in a non spatial table but want to display those features that are related to the table records found from the search.  Not an easy one to solve.  I can do it in ArcMap with Subquery but have found nothing for online.  For example PrimaryKey IN (SELECT PrimaryKey FROM SpecDetail WHERE SpeciesList = 'ARTR2')

I tried going from table to Relate FC and the reverse but just nothing ever happens.  What should happen?  Get a list, selects in the attribute table?

Any more guidance on this?

Thanks a lot

Robert.  I wanted to ask if it were possible to use two variables in a search expression within the eSearch widget.  I am using it for a parcel layer and one of the searches involves a deed book  and then a page number in two separate fields.  I am hoping there is a way to structure the SQL syntax to include both both values within the same search string.  Thanks

James Armstrong


   The eSearch is limited to relates support in that it will show related records for individual search results. Meaning you search for something in a service layer and those results are shown in the widget then you can get related records for each of those individual search results. Currently this is all the support that is available for related records.


   Absolutely. Just add a second Expression Value for the second field you want to search on.


Thanks. Not sure why or how I overlooked that method. I do have one other question. The sales data field in my data is set as a string. Is there a way to edit the sql statement in the search widget so that I could cast the date string as a actual date?

Thanks Again


Not that I am aware of.

Hi Robert - I have found myself in a situation where I potentially need to return more than a 1000 results from a layer.  I have increased the query value of my hosted feature layer to support up to 4900 results.  At the moment I am still in wab 2.8, eSearch version 2.7.  I seemed to recall being able to override results return somewhere, but can't recall where I saw this.  Can you assist?




   Sorry I am not really clear on this.

I seemed to recall being able to override results return somewhere, but can't recall where I saw this.

What are you trying to achieve?

Sorry Robert - this is a layer capability config issue on my side.  I was thinking that there was a result return limit in the eSearch, but I know that's not the case. I'm working with hosted feature layer views, and while I increased the Query capability on the source hosted feature layer using the python api .Update method, I did not do so with the views.  Once I updated the query capability on the hosted views layers, I get the expected amount of records.

I'm setting up a new web app with WABDE version 2.11, so I downloaded your latest update on this widget. I've got it installed and configured, but my browser is not accepting any text in the search box. Is there anything in your settings that I might need to change to fix this? The layer I'm using works fine in the regular Search widget, but I'm not discounting the possibility that there is an issue with my service.

esearch error screenshot


   Based on the image it does not look like you have properly configured the widget to search your layer. What does your browsers web console say the error is?

I'm not getting any errors. When I activate the widget, the highlighted lines show up, but no errors that I'm finding.

console screenshot

That you have not chosen any fields to include in your search. Pretty big issue!

Plus your Owner information seems to be broken up into 3 fields which will make searching it difficult.

LOL! I really wish I hadn't posted that now! I was starting over from scratch when I got that message, so I hadn't actually configured anything yet. It went away as soon as I finished the configuration. 

I found the missing configuration in the meantime. I didn't have the "Ask for values" box checked inside the Update Expression Value.

Hi Robert,

I'm aware of the definition expressions you can set in your widget for search layers, but is there a way to have your widget only search on

the current filters set in the Filter Widget?

Example: I have a statewide layer of sampling locations. I use the filter widget to filter and show only those within a certain county. I now use the enhanced search widget to select sampling locations monitored within a certain date, but only those stations within the filtered county are selected.

Thanks for all your hard work on this most useful widget.



   Unfortunately No. The issue is that the eSearch widget does not rely on the search layer already being part of the map. The filter widget depends on the layer being part of the map. Adding both the logic to see if a layer that is configured in the eSearch widget and the logic for using the applied filter on that layer is not in my plans for this widget right now.

Just my 2 cents but I have to say that I rely on the fact that the eSearch operates independently from the map layers.   I simply add or enhance my expression to account for filtering if needed.  In those cases where we want / need a query widget to rely on filtered layers then I default back to using the Query widget.  These are usually simpler use cases


We use this widget (but for the Flex API) and I try to configure it (2.11) with wab 2.11. I have a problem that prevents me from specifying search layers ... the + button does not work. No windows or pop-ups appear. I try with explorer edge and chrome... there no popup blocker....Can you help me please ?


Thanks you very much


  Sounds like I have a french locale issue in my code. Can you open your browsers web console and screenshot the error that is likely shown there?

console chrome locale

Thanks you


So it looks like there is an issue with the single quote in the 'Exportateur de collection d'objets' string. I forgot to escape the single quote.

So to fix this make these changes in the [install dir]\server\apps\[app#]\widgets\eSearch\setting\nls\fr\strings.js

allowfcexport: "Exportateur de collection d'objets",

datedisplayformat: "Format d'affichage de la date",

change to:

allowfcexport: "Exportateur de collection d\'objets",

datedisplayformat: "Format d\'affichage de la date",

Hi Robert,

eSearch is populating my Unique values but when I search I'm getting a "Search Failed!" message, and I know the item is there.

screenshot of Console of the error.


   What version of WAB are you using? I see in the error that it states wab_dv 2.11 but DrawBox.js line 138 has nothing to do with drawToolBar.... Something is off here.

Dear Robert!

Your widget is excellent as usual.

Can it be possible in the future (maybe in the next version) when I choose to add more than one expression value (only 2) to have an option to filter values for the second expression by the first one? For example: Countries and towns. First to select the country, but in the second (town) expression I would like to see unique values that can match with the country I have selected, not all of them.




  It is one of those things on my Long to do list.

Hello Robert!

Is it possible easily to adopt your predefined value function to the standard esri query widget? Query widget works with predefined unique values, but the user cannot search in it. But in your widget it's awesome. If I know well, you use filteringselect, but I am not master in this topic, unfortunately I don't kwow, how to rewrite something in the query widget to work as your predefined values, where the users can type something, and I see only this.

Thanks your help!


   It would be possible for a experienced developer but it is no something I can share a few lines of code for and it is done. There is a bit of work that would have to go into this.

I suspect it... thanks

Hi Robert - has anyone reported the Search control button at release 2.11 not picking up the WAB 2.11 theme colors?  I've seen this before but not sure where to go to change:

usually the control is the same as the theme color . . . 




   What theme are you using?

Sorry, it's the Foldable theme with an org shared style blue color.  


   OK. I have not tested any org shared style colors yet. Stay tuned.

will do thx


   Looks like a pretty simple fix. Replace this method in your widget.js:

      _addCustomStyle: function(theme) {
        var customStyles = lang.getObject('customStyles', false, theme);
        if(!customStyles || !customStyles.mainBackgroundColor || customStyles.mainBackgroundColor === ""){
        var rgbArray = Color.fromHex(customStyles.mainBackgroundColor).toRgb();
        var cssText = ".FoldableTheme.yellow .jimu-draw-box .draw-item.jimu-state-active,";
        cssText += ".TabTheme.yellow .jimu-draw-box .draw-item.jimu-state-active,";
        cssText += ".FoldableTheme.yellow .widget-esearch .search-btn,";
        cssText += ".TabTheme.yellow .widget-esearch .search-btn,";
        cssText += ".JewelryBoxTheme.yellow .widget-esearch .search-btn,";
        cssText += ".LaunchpadTheme.style3 .widget-esearch .search-btn,";
        cssText += ".JewelryBoxTheme.yellow .jimu-draw-box .draw-item.jimu-state-active {";
        cssText += "background-color: rgb(" + rgbArray.join(",") + ");";
        cssText += "background-color: rgba(" + rgbArray.join(",") + ", 1);";
        cssText += "}";
        cssText += ".FoldableTheme.yellow .widget-esearch .search-btn:hover,";
        cssText += ".TabTheme.yellow .widget-esearch .search-btn:hover,";
        cssText += ".JewelryBoxTheme.yellow .widget-esearch .search-btn:hover,";
        cssText += ".LaunchpadTheme.style3 .widget-esearch .search-btn:hover,";
        cssText += ".FoldableTheme.yellow .jimu-draw-box .draw-item:hover,";
        cssText += ".TabTheme.yellow .jimu-draw-box .draw-item:hover,";
        cssText += ".JewelryBoxTheme.yellow .jimu-draw-box .draw-item:hover {";
        cssText += "background-color: rgb(" + rgbArray.join(",") + ");";
        cssText += "-ms-filter: 'Alpha(opacity=70)';"
        cssText += "background-color: rgba(" + rgbArray.join(",") + ", 0.7);";
        cssText += "}";

        var style = html.create('style', {
          type: 'text/css'
        try {
        } catch(err) {
          style.styleSheet.cssText = cssText;
        style.setAttribute('source', 'custom');


Got it thanks I'll report back

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