Enhanced Search Widget Version 2.23.1 - 11/22/22

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

Enhanced Search Widget Version 2.23.1 - 11/22/22

Live Preview Site

Web AppBuilder for ArcGIS | Help - Enhanced Search widget

 

List of the latest enhancements and changes:

  1. Fixed issue with Spatial Relationship settings

Older enhancements or changes

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

 

Older Versions

Last 2.21 version

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)
Attachments
Comments

Hi Robert,

 

 

I have tested out the following Custom Widgets with Web AppBuilder 2.6 using all 9 Themes.

 

Enhanced Search Widget 2.6.0.1, Version 74                       11/17/2017

 

Enhanced Basemap Gallery Widget 2.5, Version 14            8/10/2017

 

Identify Widget 2.5.0.1, Version 28                                      8/16/2017

 

Elevation Profile Widget 2.5, Version 16                             8/10/2017

 

Map Progress Indicator Widget 2.5, Version 9                     8/10/2017

 

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

 

Enhanced Locate Widget 2.5, Version 13                             8/10/2017

 

Popup Panel Widget 2.6, Version 15                                     11/17/2017

 

 

Everything is working like a charm!

 

 

Here are the 9 test Themes:

 

Foldable Theme

http://www.tapasdas.com/Maps/Phones/app265

 

 

 

 

Launchpad Theme

http://www.tapasdas.com/Maps/Phones/app266

 

 

 

 

Dart Theme

http://www.tapasdas.com/Maps/Phones/app267

 

 

 

Tab Theme

http://www.tapasdas.com/Maps/Phones/app268

 

 

 

JewelryBox Theme

http://www.tapasdas.com/Maps/Phones/app269

 

 

 

Box Theme

http://www.tapasdas.com/Maps/Phones/app270

 

 

 

Billboard Theme

http://www.tapasdas.com/Maps/Phones/app271

 

 

 

Plateau Theme

http://www.tapasdas.com/Maps/Phones/app272

 

 

 

Dashboard Theme

http://www.tapasdas.com/Maps/Phones/app273

 

 

 

 

Thanks again for all your help in getting these templates working for WAB 2.6 with your Custom Widgets.

 

 

Best regards,

 

 

Tapas

Hi Robert - I'm noticing at 2.6 that the data sources section of the main config.json seems to be populating with layer, attribute and other eSearch config info after adding the widget - i.e:

  "dataSource": {
 "dataSources": {
 "widget~widgets_eSearch_Widget_25~0": {
 "id": "widget~widgets_eSearch_Widget_25~0",
 "type": "Features",
 "label": "Louisville Zoning",
 "dataSchema": {
 "geometryType": "esriGeometryPolygon",
 "fields": [
 {
 "name": "OBJECTID",
 "type": "esriFieldTypeOID",
 "alias": "OBJECTID"
 },
 {
 "name": "Shape",
 "type": "esriFieldTypeGeometry",
 "alias": "Shape"
 },
 {
 "name": "ZONING_CODE",
 "type": "esriFieldTypeString",
 "alias": "ZONING_CODE",
 "length": 7
 }, 

I think I've seen this happen before with earlier builds.  I just remove after app export for posting.

David,

  That is correct the latest version adds that data to the config for datasource sharing between widgets.

Ah, my apologies that's functionality we haven't been using.

Oh now I see it!  Change number 6 above

I'm getting unexpected results from the enhanced search v2.6. To be specific I have configured a search to only show a few fields in the results pane and want to use the PopUp Panel widget to display from the webmap. I understand there is an option to only display those certain fields in the popup, but I don't have it configured that way. I've attached screen shots to hopefully explain.

Also is it possible to automatically show the popup when esearch is performed instead of having to click on the result. Thanks for any information!

Martin,

  I am not sure but it seems like you are not understanding some of the widget settings.

When you (eSearch widget not involved) click on a parcel the popup panel will show all fields that are configured for the parcel.

If you use the eSearch a new layer is added to the map which would only have your three configured fields as attributes in the result. BUT if you choose "Use Popup from" "Web Map" then all the layers fields in the popup.

Maybe I am a little confused. I understand when you (eSearch widget not involved) click on a parcel the popup panel will show all fields that are configured for the parcel. But I figured if you configure the esearch to "Use Popup from" "Web Map" I would see all of the fields in the PopUp Panel widget since that's how it's set in the webmap. 

I see what you're saying now. It's using the popup from the webmap but only displaying those fields that have been defined in the results. Is there a way to modify that? So that only certain fields are in the reults pane, but the PopUp Panel widget displays them all?

Martin,

   For that you need to add all the field to the eSearch widget and choose "popup only" for all the fields other than the ones you want in the results pane.

I'm an idiot. Thanks Robert! For whatever reason I was thinking if I set it to PopUp only it would exclude those fields from the results pane.

Is there a way to have the popup come on automatically without having to click on the result?

Martin,

  No because there many normally be more than one result and a popup is result specific that is an impractical feature.

That's a good point. Thanks Robert.

Hi Robert,

We recently discovered an issue with retrieving and downloading attachments from a SSL enabled map service using a modified version of the eSearch widget in our projects. Sometimes, the security token is not attached to the URL string for the attachment which cases access errors. In trouble-shooting the problem, I found the following code is not pick up the token consistently. Sometimes it does, sometimes not.

      _addAttachment: function(OID) {
        var ofl = new FeatureLayer(this.resultLayers[this.currentLayerIndex]._origLayerURL);
        ofl.queryAttachmentInfos(OID, lang.hitch(this, function(info){
          if(info.length > 0){
            var domAttSec = dojoQuery(".attachmentsSection", this.map.infoWindow.domNode)[0];
            var aWidget = dijit.getEnclosingWidget(domAttSec);
            array.map(info, lang.hitch(this, function(att){
              var attLi = domConstruct.toDom('<li><a href="' + att.url + '" target="_blank">' + att.name +'</a></li>');
              domConstruct.place(attLi, aWidget._attachmentsList);
            }));
            domClass.remove(domAttSec,'hidden');
            aWidget = null;
          }
        }));
        ofl = null;
      },

To mitigate the problem, I captured the token in another part of the widget.js code, and appended it to the attachment url string if it is missing. This workaround seemed to have solved our immediate problem. I would like to share it with you and see if there are better ways to handle this. 

    _addAttachment: function(OID) {
        var ofl = new FeatureLayer(this.resultLayers[this.currentLayerIndex]._origLayerURL);
        ofl.queryAttachmentInfos(OID, lang.hitch(this, function(info){
        if(info.length > 0){
            var domAttSec = dojoQuery(".attachmentsSection", this.map.infoWindow.domNode)[0];
            var aWidget = dijit.getEnclosingWidget(domAttSec);
            var self = this;
            array.map(info, lang.hitch(this, function(att){
                var url =  att.url;
                var arrUrl = url.split("?token=");
                if (arrUrl.length == 1 ) 
                    url = url + "?token=" + self.token;
              var attLi = domConstruct.toDom('<li><a href="' + url + '" target="_blank">' + att.name +'</a></li>');
              domConstruct.place(attLi, aWidget._attachmentsList);
            }));
            domClass.remove(domAttSec,'hidden');
            aWidget = null;
          }
        }));
        ofl = null;
      },

Thanks!

Andy

Andy,

   Thanks for sharing. That looks like a great way to handle that issue. Can you provide your code for self.token?

Also here is how I would normally handle the concat of the url (four lines down to three and no additional vars created):

if(self.token && att.url.indexOf("?token=") < 0){
  att.url + "?token=" + self.token;
}‍‍‍‍‍‍‍‍‍

Hi Robert,

Is it possible to find areas in Layer 1 which are falling outside of Polygon in Layer 2 using this eSearch Widget?

Thanks,

Krish

Krish,

   No that is not a supported workflow.

Hi Robert,

Hope you are doing great! Thanks for the really precious widget!

  1. Is there is an option to give esearch data results to info summary widget like filter widget. When I do something in Filter widget , data is also change in Info Summary Widget at run time which is very useful.
  2. In esearch widget we usually add data source from rest url. I was trying to add data from my web map through arcgis online. I did not find a way to add, do I miss something? 

Irfan,

  1.  I will have to look into this as I am not familiar with the info summary widget.
  2. A web map is just a pointer file that has layers with actual urls to rest services. So no you need to get the actual url for the layer in your web map and use that.

Thanks Robert!

Hi Robert,

I am running into an issue when searching by value.

When searching for '300 Centennial Way', there where clause produced comes out as:

Upper(FULLADDR) LIKE Upper('%300%') OR Upper(FULLADDR) LIKE Upper('%Centennial%') OR Upper(FULLADDR) LIKE Upper('%Way%')

In previous versions, it didn't split the search text by space when creating the where clause.

Is this an error or was the change intentional?

Thanks,

Patrick

Patrick,

   That was an intentional change to be sure that any part of a string that was entered would return results.

Is it possible to have different sorting based on which search expression is used? Eg: Parcels have 2 different searh expressions Owner Name & Address depending on which one of the search critera used "Owner" sort on Owner field "Address" sort on Address field.

Martin,

   There is nothing in place for this now, but I see your point as that would be helpful. I will add it to the list of possible enhancements.

Thanks Robert!

Thanks for the response Robert.

Can you point me where to make changes if I wanted to revert back to the previous search query?

Patrick,

   What is the issue you are having with the change? I have had no one report an issues. Actually it has been the opposite, people are getting better results.

Say some one types "W 5th" it would return "W 5th St", "W 5th Rd", "W Whatever" "5th St", "5th Rd".

Anyway, in the Widget.js buildWhereClause function find these lines:

          if (tOperation === 'stringOperatorContains') {
            if(content[s].value.toString() === ""){
              continue;
            }
            var sa = content[s].value.toString().split(" "), word;
            for(w=0; w < sa.length; w++){
              word = sa[w];
              criteriaFromValue = queryExpr.replace(myPattern, word);
              expr = this.AppendTo(expr, criteriaFromValue, tOperator);
            }
            continue;
          }

And change then to:

          if (tOperation === 'stringOperatorContains') {
            if(content[s].value.toString() === ""){
              continue;
            }
            criteriaFromValue = queryExpr.replace(myPattern, content[s].value.toString());
            expr = this.AppendTo(expr, criteriaFromValue, tOperator);
            continue;
          }

Robert,

I was having issues searching for site addresses. When entering a shortened search queries like '1234 Ma' for '1234 Main St', it would return all site address with '1234' and 'MA'. I've always liked having the ability to not enter the complete site address. That is just my personal preference.

Thanks for the code! Appreciate it!

Patrick

I'm have issues with this new search as well under my Owner field, in 2.4 when I put in my search box for Owner: Ruck, Kat I received 5 parcels with the complete words Ruck and Kat someplace in them. Now when I enter: Ruck, Kat I get 501 Records! which doesn't help at all! those might have Kat or Ruck in them.

The SQL statement is:  Upper(OWNER) LIKE Upper('%[value]%') in both so what is the change?

James,

   If the SQL is the same in 2.4 and your current version then I don't know what the change is.

I know what the problem is from the Web Console the SQL has changed from AND to OR but I don't know how to return it to AND.

2.4
SQL Where with layers definition expression: Upper(OWNER) LIKE Upper('%Ruck,%') AND Upper(OWNER) LIKE Upper('%Kat%')

2.6
SQL Where with layers definition expression: Upper(OWNER) LIKE Upper('%Ruck,%') OR Upper(OWNER) LIKE Upper('%Kat%')

James,

  What exact version are you using? You can hold the Alt key on the keyboard and click on the widget to display a window with widget version info.

Widget Version: 2.6.0.1 Widget is designed to run in Web AppBuilder version: 2.6 This enhanced search widget offers the ability to search by a string, geometry and spatial relationship.

James,

  In your config_eSearch.json for that layer and it's expression so you have:

                  "operator": "AND" or "operator": "OR"?

If you do have AND then download 2.6.0.1. again and add it to your app to see if some how you did not get the fix for some reason.

Is anyone familiar with a sample and/or previous implementation of a Query Builder for the JS API? I see where there is a Flex widget available but have not been able to find a JS counterpart.

I try geoprocessing with select by attribute but there is no query builder in widget .(expression query must be fixed in input ) . 

Thanks in advance!

Hi Robert, I hope you are doing great!

In my esearch widget I have added  definition expression for different date such as 

Past 2 week, Past 6 month, and Past 1 year these expression are working very well. I can search and filter my data from different past dates. Problem is other widgets in my app such as Near Me, Situational Awareness, and Info Summary widgets do not honor my search results from esearch widget. These other widgets honor and listen data from filter widget. Is it possible to make this happens my other widgets can listen data from esearch widget. I will appreciate your help! 

Thanks,

Hi Robert , 

Please what about select by attribute with sql query builder like in arcmap  ?? 

Ikbel,

  Sorry there is no such widget in JS that I am aware of and currently I have no plans for that.

Irfan,

   The WAB team has tightly integrate the filter widget into the core of the WAB app and thus any filter is carried over to other widget. I do not have that ability to modify core WAB libraries with my widget.

Sorry I do not have any free time right now to look at that.

Thank You Robert! I really appreciate your help. My apology, I know you are very busy person whenever you have free time please look at it or give me any guideline.

Again sorry to bother you! Enjoy your holidays!

Thanks Robet . I had found this code about query builder but there is no attribute table . How can i please export the query result in the attribute table . http://arcgis.graphtech-gis.com/apps/SelectByAtt/

Ikbel,

   This thread is for the eSearch widget. Unrelated questions should be asked in their own new thread.

Hope you had a great Christmas Robert,

Could you point me to what I could edit to change the hint boxes that show below the search fields in Esearch to be on top and not below?

James,

   In the SingleParameter.html replace all the contents with this: 

<div>
  <table style="width:100%;">
    <colgroup>
      <col width="100px" />
      <col width="auto" />
    </colgroup>
    <tbody>
      <tr data-dojo-attach-point="uniqueMessageTR" style="display: none;">
        <td colspan="2">
          <div style="margin-bottom: 8px; height: 18px;">
            <div class="uniqueBusy"></div>
            <div class="uniqueMessage" data-dojo-attach-point="uniqueMessageNode"></div>
            <div class="cancelUnique" data-dojo-attach-point="uniqueCancelNode">${nls.cancel}</div>
          </div>
        </td>
      </tr>
      <tr>
        <td>
          <span class="required" title="${nls.requiredTip}" data-dojo-attach-point="requiredNode">*${nls.required}</span>
        </td>
        <td>
          <div class="hint" data-dojo-attach-point="hintNode"></div>
        </td>
      </tr>
      <tr>
        <td>
          <div class="prompt" data-dojo-attach-point="promptNode"></div>
        </td>
        <td>
          <div data-dojo-attach-point="allValueBoxContainer" style="width:100%;padding-bottom:2px;">
            <div data-dojo-attach-point="stringTextBoxContainer" style="display:none;">
              <input data-dojo-attach-point="stringTextBox" data-dojo-type="dijit/form/TextBox" data-dojo-props="trim:true" style="display:none;width:100%;height:30px;" class="dijit-form-TextBox" />
              <div data-dojo-attach-point="stringCodedValuesFS" data-dojo-type="dijit/form/FilteringSelect"
                   data-dojo-props="searchAttr:'name',intermediateChanges:true" class="dijit-form-FilteringSelect"></div>
            </div>

            <div data-dojo-attach-point="numberTextBoxContainer" style="display:none;">
              <input data-dojo-attach-point="numberTextBox" data-dojo-type="dijit/form/NumberTextBox"
                     data-dojo-props="intermediateChanges:true,constraints: {pattern: '#####0.##########'}"
                     class="dijit-form-NumberTextBox" style="display:none;width:100%;height:30px;" />
              <div data-dojo-attach-point="numberCodedValuesFS" data-dojo-type="dijit/form/FilteringSelect"
                   data-dojo-props="searchAttr:'name',required:false,intermediateChanges:true" class="dijit-form-FilteringSelect"></div>
              <table data-dojo-attach-point="numberRangeTable" style="display:none;width:100%;border-collapse:collapse;" cellpadding="0" cellspacing="0">
                <tbody>
                  <tr>
                    <td style="width:40%;">
                      <input data-dojo-attach-point="numberTextBox1" data-dojo-type="dijit/form/NumberTextBox" data-dojo-attach-event="blur:_onRangeNumberBlur" data-dojo-props="intermediateChanges:true,constraints: {pattern: '#####0.##########'}" class="dijit-form-NumberTextBox" style="width:100%;height:30px;" />
                    </td>
                    <td style="width:20%;text-align:center;">
                      <span>${nls.and}</span>
                    </td>
                    <td style="width:40%;">
                      <input data-dojo-attach-point="numberTextBox2" data-dojo-type="dijit/form/NumberTextBox" data-dojo-attach-event="blur:_onRangeNumberBlur" data-dojo-props="intermediateChanges:true,constraints: {pattern: '#####0.##########'}" class="dijit-form-NumberTextBox" style="width:100%;height:30px;" />
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>

            <div data-dojo-attach-point="dateTextBoxContainer" style="display:none;">
              <input data-dojo-attach-point="dateTextBox" data-dojo-type="dijit/form/DateTextBox"
                     data-dojo-props="value:new Date(),trim:true,constraints:{datePattern: 'yyyy-MM-dd'}"
                     class="dijit-form-DateTextBox" style="display:none;width:100%;height:30px;" />

              <table data-dojo-attach-point="dateRangeTable" style="display:none;width:100%;border-collapse:collapse;" cellpadding="0" cellspacing="0">
                <tbody>
                  <tr>
                    <td style="width:40%;">
                      <input data-dojo-attach-point="dateTextBox1" data-dojo-type="dijit/form/DateTextBox"
                             data-dojo-attach-event="change:_onRangeDateBlur"
                             data-dojo-props="value:new Date(),trim:true,constraints:{datePattern: 'yyyy-MM-dd'}"
                             class="dijit-form-DateTextBox" style="width:100%;height:30px;" />
                    </td>
                    <td style="width:20%;text-align:center;">
                      <span>${nls.and}</span>
                    </td>
                    <td>
                      <input data-dojo-attach-point="dateTextBox2" data-dojo-type="dijit/form/DateTextBox" data-dojo-attach-event="change:_onRangeDateBlur"
                             data-dojo-props="value:new Date(),trim:true,constraints:{datePattern: 'yyyy-MM-dd'}"
                             class="dijit-form-DateTextBox" style="width:100%;height:30px;" />
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
          </div>
        </td>
      </tr>
    </tbody>
  </table>
</div>

Robert,

I was curious if it's possible to change the symbology of the feature selected on the map from the click event in the results pane? So basically if you have multiple features selected have the symbology change as the user clicks on the record in the results. I've attached an image to be tter describe what I'm talking about. 

Martin,

   Right now the highlight ability in this widget comes from the popup. So if you enable the popup to be shown of result click then you will get a cyan highlight of the parcel.

Hi Robert, 

How to update with new version 2.6.1 easily. I mean just to replace with new one in Stemapp? By replacing with new version our customize UI for esearch widget will also lost. Any idea to save it?

Irfan,

  You replace the eSearch Widget folder in the stemapp widgets folder and any app that has the widget added to it you need to replace the eSearch folder in those apps as well. As far as customization you have done to the widgets UI, yes those will be lost and you will have to re-add those, there is no easy way to do that.

Thanks Robert! I really appreciate your effort and help in this widget.

Version history
Last update:
‎11-22-2022 07:31 AM
Updated by: