Enhanced Search Widget Version 2.17 - 12/11/20

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

Hey Robert Scheitlin, GISP

Sorry if this has been covered, but I searched and didn't find an answer.

I'm having issues getting a maximum of 1,000 results back from the eSearch widget. If I do a 1,500 meter buffer and do a search on the parcels, it should return in the 10,000s, but it always seems to cap it at 1,000. I've combed through the config and stuff and I can't seem to find where I can open this up to allowing more results. Any suggestions?

Tyler,

   The eSearch widget will return what ever the max record count for the map service is set to. So it has nothing to do with the widget it is the mapserver max record count that has to be adjusted.

Hey Kevin,

 

The Reporting Widget is not a standard ESRI Widget that comes with the Developer Edition of the Web AppBuilder 2.9.

 

The Geocortex Reporting Widget comes from Latitude Geographics.

 

http://www.latitudegeo.com/

 

They have released a new product named Geocortex Reporting which can be used as a Software-as-a-Service.

 

http://www.geocortex.com/products/geocortex-reporting/

 

 

You can try out this software with a 60-day free trial by launching:

 

https://apps.geocortex.com/reporting/designer

 

You can use your existing ArcGIS Online Account. The reports that you create will be saved under the My Contents folder of your ArcGIS Online Account.

 

The Geocortex Reporting Widget is simply a container to access these Reports within the Web AppBuilder.

 

Download my demo Web App

 

http://www.davidapps.net/maps/phones/app275.zip

 

Unzip the folder.

You will find the Reporting Widget under:

App275/widgets/Reporting

 

Copy this Reporting Widget under your widgets folder in your Web AppBuilder application and you are good to go.

 

I have documented this entire process here:

 

http://www.davidapps.net/geocortex/SimpleReport.pdf

 

This walks you through creating a simple report that displays the Object IDs of the selected parcels.

 

This is the finished Web App:

 

http://www.davidapps.net/maps/phones/app275/

 

 

Thanks a million for creating the awesome Google Earth Widget and the Pictometry
Widget for the Web AppBuilder!

 

I use them in all my apps. They give our users more ways to explore their property.

 

Hope to see you at the Dev Summit next year.

 

David

DAVID DAS‌ interesting. Very nice looking app!  Great work. I have heard of Geocortex but have not used it. So I'll check this out the trial.  I think however the Screening Tool I might be able to tailor a bit to replicate this concept.   Also, I saw how to use eSearch for input in to Infographics (an out-of-the-box the Esri widget) while experimenting, which provide slick capability for visualizing various attributes. Here is my Work in Progress app for property search. I put the Infographics in the $ Analysis tool.

Hi Kevin,

 

Thanks so much for sharing your Property Search App.

 

https://cloud.sagis.org/sagisnext/

 

You have done an excellent job! I like how you have tied to results of the Enhanced Search Widget to feed into the analysis tools.

 

This is an elegant way to make fast comparisons.

 

 

The colored icons look attractive. What software did you use to make these icons?

 

David

Robert,

I downloaded the 2.6 version of this widget, and I love the functionality.  The problem that I am experiencing is that in the results tab, only when you click on the first result in the list does it zoom to the result.  Any of the other results that are in the list, when you click on them, they do nothing.  Is this a known bug that you are planning on fixing, or is there something in the configuration that I am doing wrong?

Thanks for all of your hard work on the WAB widgets.

Michelle

Michelle,

   I can't remember old issues like that. Are you using 2.6.1.1 version of the widget? Do you see any errors in your browsers web console?

Robert,

Yes I am using 2.6.1 version. This is the error that I get when I click on the 2nd result in the list.

SCRIPT5007: Unable to get property 'toJson' of undefined or null reference
File: Widget.js, Line: 3846, Column: 11

The layer that I am using gets its information from a table view, so I’m not sure if that’s an issue. It seems to be an issue for the stock Query widget (that won’t even allow me to query), and I was hoping your widget would fix that issue.

Michelle

Michelle,

   No my widget does not support feature without geometry yet either. I am working on this in version 2.9 of my widget (support for no geographic feature queries).

Robert,

The features have geometry (latitude, longitude, and shape fields), they just don’t have an object id, which is the problem with the query widget (and I have a feeling the zoom capabilities on yours).

Hmm.. I fixed an issue with spatial views and not ObjectId field in the 2.6.0.1 version. Are you sure you are using the 2.6.1 version of the widget? You can check by holding the alt key and clicking on the widget.

On the page where you can download the 2.7 zip file, there is a place where is says download latest 2.6 version. That is the one that I clicked on to download. I am using WAB Developer Edition 2.7, and all it does is opens the widget when I hold the alt key and click on it.

Michelle,

   Not the widget placeholder but the actual widget window. If you are using WAB 2.7 then you should be using the 2.7 version of the widget.

I tried to use the 2.7 version and had the same problem with the zooming, so that’s why I downloaded the latest 2.6 version to see if it was a version issue. The WAB still shows that it is version 2.7, even though I deleted that one and pasted the latest 2.6 version in the folder.

Michelle,

   That makes much more sense according to where you are getting the error from tells me that you are using 2.7 version of the widget. Moving down to 2.6 will not help. So the error is saying that there is no graphic in the result item, therefore it can not clone the graphic to show the selection symbol on the map. So the question is why is there no graphic attached to the result item. Unfortunately I have no way of knowing that as it stands now.

Hi Robert,

I'm using version 2.6.1.1 and noticed a bug when handling services that are secured/restricted to users/group within Portal. The layer item is removed from the pull down menu when querying "By Shape" but not from the pull down menu when querying "By Value".

Regards,

James

James,

??? So are you saying that the user is prompted to login for access and does not? I am not following.

Sorry Robert,

Let me clarify. If the user does not have permissions and cancels/closes the login window, there's a message that the layer will be removed from the widget. However, it looks like it's only removed from the pull down menu under the By Shape tab and not from the By Value tab. Hope this helps.

James,

   OK, Thanks for reporting this bug. Here is the fix I will have in the 2.9 version. You can add it to whatever version you are using now.

Replace this function in the Widget.js

      _initLayerSelect: function () {
        this.serviceFailureNames = [];
        if(!this.currentFeatures){
          this.currentFeatures = [];
        }
        var graOptions = [];
        var spatialOptions = [];
        var attribOptions = [];
        var len = this.config.layers.length;
        for (var i = 0; i < len; i++) {
          var option = {
            value: i,
            label: this.config.layers[i].name
          };
          graOptions.push(option);
          if (this.config.layers[i].spatialsearchlayer) {
            spatialOptions.push(option);
          }
          if(this.config.layers[i].expressions.expression.length > 0){
            attribOptions.push(option);
          }
        }
        //select the first layer in the lists
        if (graOptions.length > 0) {
          graOptions[0].selected = true;
        }
        if (spatialOptions.length > 0) {
          spatialOptions[0].selected = true;
        }
        if (attribOptions.length > 0) {
          attribOptions[0].selected = true;
        }else{
          html.setStyle(this.addSqlTextDiv, 'display', 'none');
        }

        if (len > 0) {
          this.paramsDijit = new Parameters({
            nls: this.nls,
            layerUniqueCache: this.layerUniqueCache,
            disableuvcache: this.config.disableuvcache,
            selectFilterType: this.config.selectfilter,
            datedisplayformat: this.config.datedisplayformat
          });
          this.paramsDijit.placeAt(this.parametersDiv);
          this.paramsDijit.startup();
          this.paramsDijit.on('enter-pressed', lang.hitch(this, function () {
            this.search(null, this.AttributeLayerIndex, this.expressIndex);
          }));
          this.shelter.show();

          var defs = array.map(this.config.layers, lang.hitch(this, function (layerConfig) {
            return this._getLayerInfoWithRelationships(layerConfig.url);
          }));

          all(defs).then(lang.hitch(this, function (results) {
            this.shelter.hide();
            array.forEach(results, lang.hitch(this, function (result, j) {
              if(result.state === 'success'){
                var layerInfo = result.value;
                //console.info(layerInfo);
                var layerConfig = this.config.layers[j];

                if (layerInfo.objectIdField) {
                  layerConfig.objectIdField = layerInfo.objectIdField;
                } else {
                  var fields = layerInfo.fields;
                  var oidFieldInfos = array.filter(fields, lang.hitch(this, function (fieldInfo) {
                    return fieldInfo.type === 'esriFieldTypeOID';
                  }));
                  if (oidFieldInfos.length > 0) {
                    var oidFieldInfo = oidFieldInfos[0];
                    layerConfig.objectIdField = oidFieldInfo.name;
                  }else{
                    var oidFieldInfos = array.filter(fields, lang.hitch(this, function (fieldInfo) {
                      return fieldInfo.type === 'esriFieldTypeInteger' && fieldInfo.name.toUpperCase() === 'OBJECTID';
                    }));
                    if (oidFieldInfos.length > 0) {
                      var oidFieldInfo = oidFieldInfos[0];
                      layerConfig.objectIdField = oidFieldInfo.name;
                    }
                  }
                }
                layerConfig.existObjectId = array.some(layerConfig.fields.field, lang.hitch(this, function (element) {
                  return element.name === layerConfig.objectIdField;
                }));
                layerConfig.typeIdField = layerInfo.typeIdField;
                //ImageServiceLayer doesn't have drawingInfo
                if (!layerInfo.drawingInfo) {
                  layerInfo.drawingInfo = {};
                }
                layerInfo.name = this.nls.search + ' ' + this.nls.results + ': ' + layerConfig.name;
                layerInfo._titleForLegend = layerInfo.name;
                layerInfo.minScale = 0;
                layerInfo.maxScale = 0;
                layerInfo.effectiveMinScale = 0;
                layerInfo.effectiveMaxScale = 0;
                layerInfo.defaultVisibility = true;
                this.resultLayers.push(layerInfo);
              }else{
                //remove this layer from the options list
                var aIndex = -1, gIndex = -1, sIndex = -1;
                array.some(attribOptions, lang.hitch(this, function(option, a){
                  if(option.label === this.config.layers[j].name){
                    aIndex = a;
                    return true;
                  }
                  return false;
                }));
                array.some(graOptions, lang.hitch(this, function(option, g){
                  if(option.label === this.config.layers[j].name){
                    gIndex = g;
                    return true;
                  }
                  return false;
                }));
                array.some(spatialOptions, lang.hitch(this, function(option, s){
                  if(option.label === this.config.layers[j].name){
                    sIndex = s;
                    return true;
                  }
                  return false;
                }));
                if(aIndex > -1){
                  attribOptions.splice(aIndex, 1);
                }
                if(gIndex > -1){
                  graOptions.splice(gIndex, 1);
                }
                if(sIndex > -1){
                  spatialOptions.splice(sIndex, 1);
                }
                this.serviceFailureNames.push(this.config.layers[j].name);
                this.resultLayers.push({});
              }
            }));
            setTimeout(lang.hitch(this, function(){
              if(graOptions.length === 1){
                this.labelLayerGraphical.innerHTML = graOptions[0].label;
                html.setStyle(dojoQuery(".esearch-select-graphic")[0], 'display', 'none');
                html.removeClass(this.labelLayerGraphical, 'hidden');
              }else{
                this.selectLayerGraphical.addOption(graOptions);
              }
              if(attribOptions.length === 1){
                this.labelLayerAttribute.innerHTML = attribOptions[0].label;
                html.setStyle(dojoQuery(".esearch-select-attrib")[0], 'display', 'none');
                html.removeClass(this.labelLayerAttribute, 'hidden');
              }else{
                this.selectLayerAttribute.addOption(attribOptions);
              }
              if(spatialOptions.length === 1){
                this.labelLayerSpatial.innerHTML = spatialOptions[0].label;
                html.setStyle(dojoQuery(".select-layer-spatial")[0], 'display', 'none');
                html.removeClass(this.labelLayerSpatial, 'hidden');
              }else{
                this.selectLayerSpatial.addOption(spatialOptions);
              }
            }), 100);

            if(spatialOptions.length > 0){
              this.spatialLayerIndex = spatialOptions[0].value;
            }

            //now check if there is a url search to do
            var myObject = this.getUrlParams();
            if (myObject.esearch) {
              if(myObject.esearch === "last48"){
                var today = new Date();
                var priorDate = new Date(today.getTime() - (((24 * 60 * 60 * 1000) - 1000) * 2));
                var priorDateStr = this._formatDate(priorDate.getTime(), 'yyyy/MM/dd');
                myObject.esearch = priorDateStr + "~" + this._formatDate(new Date().getTime(), 'yyyy/MM/dd');
              }
              if(myObject.esearch === "thismonth"){
                var today = new Date();
                today.setDate(1);
                var thisMonthStr = this._formatDate(today.getTime(), 'yyyy/MM/dd');
                myObject.esearch = thisMonthStr + "~" + this._formatDate(new Date().getTime(), 'yyyy/MM/dd');
              }
              if(myObject.esearch === "thisyear"){
                var today = new Date();
                today.setMonth(0,1);
                var thisMonthStr = this._formatDate(today.getTime(), 'yyyy/MM/dd');
                myObject.esearch = thisMonthStr + "~" + this._formatDate(new Date().getTime(), 'yyyy/MM/dd');
              }
              if(this.config.layers[myObject.slayer].expressions.expression.length > 0){
                var valuesObj1 = lang.clone(this.config.layers[myObject.slayer].expressions.expression[myObject.exprnum || 0].values.value);
                var values = myObject.esearch.split("|");
                array.forEach(values, lang.hitch(this, function(val, index){
                  if (val.indexOf('~') > -1){
                    var ranges = val.split("~");
                    valuesObj1[index].valueObj.value1 = ranges[0];
                    valuesObj1[index].valueObj.value2 = ranges[1];
                  }else{
                    valuesObj1[index].valueObj.value = val;
                  }
                }));
                html.empty(this.textsearchlabel);
                if(this.config.layers[myObject.slayer].expressions.expression[myObject.exprnum || 0].textsearchlabel !== ""){
                  html.place(html.toDom(this.config.layers[myObject.slayer].expressions.expression[myObject.exprnum || 0].textsearchlabel), this.textsearchlabel);
                  html.style(this.textsearchlabel, 'display', 'block');
                }else{
                  html.style(this.textsearchlabel, 'display', 'none');
                }
                this.paramsDijit.build(valuesObj1, this.resultLayers[myObject.slayer], this.config.layers[myObject.slayer].url,
                                     this.config.layers[myObject.slayer].definitionexpression);
                on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
                  this._queryFromURL(myObject.esearch, myObject.slayer, myObject.exprnum || 0, myObject.close || false, attribOptions.length);
                }));
              }
            } else {
              //init the first available attrib layers paramsDijit
              if(attribOptions.length > 0){
                var aIndex = attribOptions[0].value;
                this.AttributeLayerIndex = aIndex;
                this._initSelectedLayerExpressions();
                if(this.config.layers[aIndex].expressions.expression.length > 0){
                  var valuesObj = lang.clone(this.config.layers[aIndex].expressions.expression[0].values.value);
                  html.empty(this.textsearchlabel);
                  if(this.config.layers[aIndex].expressions.expression[0].textsearchlabel !== ""){
                    html.place(html.toDom(this.config.layers[aIndex].expressions.expression[0].textsearchlabel), this.textsearchlabel);
                    html.style(this.textsearchlabel, 'display', 'block');
                  }else{
                    html.style(this.textsearchlabel, 'display', 'none');
                  }
                  this.paramsDijit.build(valuesObj, this.resultLayers[aIndex], this.config.layers[aIndex].url,
                                       this.config.layers[aIndex].definitionexpression);
                  on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
                    this.paramsDijit.setFocusOnFirstParam();
                  }));
                }
                //determine if this layer has any sum field(s)
                this._getSumFields(aIndex);
                if(this.sumFields.length > 0){
                  html.addClass(this.list.domNode, 'sum');
                  html.setStyle(this.divSum, 'display', '');
                }else{
                  html.removeClass(this.list.domNode, 'sum');
                  html.setStyle(this.divSum, 'display', 'none');
                }
              }
            }

            if(this.serviceFailureNames.length > 0){
              console.info("service failed", this.serviceFailureNames);
              new Message({
                titleLabel: this.nls.mapServiceFailureTitle,
                message: this.nls.mapServicefailureMsg + this.serviceFailureNames.join(", ") + this.nls.mapServicefailureMsg2
              });
            }
          }), lang.hitch(this, function (err) {
            this.shelter.hide();
            if(graOptions.length === 1){
              this.labelLayerGraphical.innerHTML = graOptions[0].label;
              html.setStyle(dojoQuery(".esearch-select-graphic")[0], 'display', 'none');
              html.removeClass(this.labelLayerGraphical, 'hidden');
            }else{
              this.selectLayerGraphical.addOption(graOptions);
            }
            if(attribOptions.length === 1){
              this.labelLayerAttribute.innerHTML = attribOptions[0].label;
              html.setStyle(dojoQuery(".esearch-select-attrib")[0], 'display', 'none');
              html.removeClass(this.labelLayerAttribute, 'hidden');
            }else{
              this.selectLayerAttribute.addOption(attribOptions);
            }
            if(spatialOptions.length === 1){
              this.labelLayerSpatial.innerHTML = spatialOptions[0].label;
              html.setStyle(dojoQuery(".select-layer-spatial")[0], 'display', 'none');
              html.removeClass(this.labelLayerSpatial, 'hidden');
            }else{
              this.selectLayerSpatial.addOption(spatialOptions);
            }
            console.error(err);
            for (var j = 0; j < this.config.layers.length; j++) {
              var layer = new GraphicsLayer();
              this.resultLayers.push(layer);
            }
          }));
        }
        this.own(on(this.selectLayerGraphical, "change", lang.hitch(this, this.onGraphicalLayerChange)));
        this.own(on(this.selectLayerAttribute, "change", lang.hitch(this, this.onAttributeLayerChange)));
        this.own(on(this.selectLayerSpatial, "change", lang.hitch(this, this.onSpatialLayerChange)));
        this.own(on(this.selectExpression, "change", lang.hitch(this, this.onAttributeLayerExpressi)));
        this.own(on(this.list, 'remove', lang.hitch(this, this._removeResultItem)));
      },

Hi Robert,

I have been using the Enhanced Search Widget for the past 2 years (Enhanced Search ver 2.3 or WAB Dev. Ed. ver 2.3 PFA 10.4). This was running extremely smoothly so far. All of a sudden I find that it takes a very long time for the widget to fetch data (total records 57,000). Even when I create a fresh search deleting the existing widget, at the time of configuring the widget when I enter Unique values for queries, it takes more than a minute to get to 2000 out of 57000 another minute and more to get to 4000 out of 57000.

In the past 2 years, it has never behaved so.

I am also using the standard Esri Query widget for a different purpose and that continues to work very fast.

I am completely baffled by this. Please help me understand why could this be happening and what would be the solution?

Thank you so much.

Vatsal

Vastal,

  So it sounds like you have not changed the eSeach widget code. So did your service change some way? Did you upgrade your ArcGIS Server? Or did you re-publish the map service?

Robert,

1. I did not change the widget code

2. Did not upgrade the server

3. Map service was indeed republished

But as I mentioned the Query widget running on the same service runs as fast as earlier. But eSearch performance is slow by a huge magnitude.

Could it be because of a) firewall b) antivirus ?

I am really at my wits’ end.

Regards,

Vatsal

Sent from my iPhone

Vastal,

  I am not sure the method the Query widget uses to get unique values, but my method is most likely different. There must have been some setting change made when the service was re-published for it to act so differently using the same code. It is hard for me to know what might have changed in your service. What about the max number of records that the service returns (the default is 1000). Did you have that value set higher and now it is back at 1000? What about the number of service instances for this map service?

EDIT: What I have found is that the Query widget will get the first 1000 unique values and add them to the dropdown and if your service has more then that it will NOT list those in the dropdown until you scroll past the first 1000 choices. Where as my method is to query the max records (i.e. 1000) until it reaches then total record count for the service and add all the unique values to the dropdown from the beginning. But my method of getting unique vals has not changed the only thing that has changed is your service...?

Robert,

There is something amiss with my service. I checked eSearch on another application and service with 1.6 Mn records and performance is not that poor. Total no. of records returned has been set at 2000 and instances are min 1 and max 2.

Let me investigate the service more thoroughly.

Thank you so much for being helpful as ever.

Regards,

Vatsal

Sent from my iPhone

We have several WAB applications deployed that were developed with various versions of Web AppBuilder (Developer Edition), many of which have the Enhanced Search widget.  We're planning an entire rebuild and redeploy of all of these WAB products using the most current Web AppBuilder (Developer Edition) version 2.9.

Will the current eSearch widget version 2.7 work or should we reconsider?

Thanks!

James,

   Yes, version 2.7 of the eSearch works fine in WAB 2.9.

In your leisure time?

Please add the ability to sort a field of the selected related records, if possible make a "Feature Action.js"

this would greatly speed the process of accessing related tables without using a popup.

Thanks for the GRAET widget!

(Edit: I've added my initial attempt below)

Hi Robert,

I have a requirement to set the "Search Layer" on load of the application based upon a url parameter value.  Something like this, where "queryLayer=structure" so make the Search layer default to the preconfigured "Structures" search rather than the default "Sites" search:

I've got the easy part to get the url parameter value, but I'm hesitant to ruin your perfectly good search widget with my feeble attempt to modify it.  I figured it best to get your feedback and perhaps some tips on how best to try and implement this.

Here's my attempt.  I've updated the "_initLayerSelect" function (around line #1106), my edit here is an additional else if from the "if (myObject.esearch){" and has a crude/simplistic reset of the aIndex variable.  Then I just copied what I thought "sets up" the default widget search when it loads.  This actually seems to work!  However:

1. The default label in the dropdown doesn't change.

2. It's untested to reveal what other thing(s) it may have broken elsewhere!

 //Altered 9/17/2018 for DBHYDRO Insights
            else if (myObject.queryLayer && !myObject.esearch) {
                if (myObject.queryLayer == 'structure') {
                    var aIndex1 = 1
                } else {
                    var aIndex1 = 0
                }
                //var valuesObj2 = lang.clone(this.config.layers[myObject.slayer].expressions.expression[myObject.exprnum || 0].values.value);
                //this.paramsDijit.build(valuesObj2, this.resultLayers[myObject.slayer], this.config.layers[myObject.slayer].url,
                //                     this.config.layers[myObject.slayer].definitionexpression);
                //on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
                //    if (attribOptions.length > 1) {
                //        this.selectLayerAttribute.set('value', myObject.slayer);
                //    }
                //}));
                var aIndex = aIndex1 //attribOptions[0].value;
                this.AttributeLayerIndex = aIndex;
                this._initSelectedLayerExpressions();
                if (this.config.layers[aIndex].expressions.expression.length > 0) {
                    var valuesObj = lang.clone(this.config.layers[aIndex].expressions.expression[0].values.value);
                    html.empty(this.textsearchlabel);
                    if (this.config.layers[aIndex].expressions.expression[0].textsearchlabel !== "") {
                        html.place(html.toDom(this.config.layers[aIndex].expressions.expression[0].textsearchlabel), this.textsearchlabel);
                        html.style(this.textsearchlabel, 'display', 'block');
                    } else {
                        html.style(this.textsearchlabel, 'display', 'none');
                    }
                    this.paramsDijit.build(valuesObj, this.resultLayers[aIndex], this.config.layers[aIndex].url,
                                         this.config.layers[aIndex].definitionexpression);
                    on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
                        this.paramsDijit.setFocusOnFirstParam();
                    }));

                }
            }

James,

  I thought I answered your question in this thread so time back.

https://community.esri.com/docs/DOC-1731-enhanced-search-widget-version-211-080116?messageTarget=all... 

Robert,

This was a while ago and had to drop the attempt but I did try to add what I thought you said were the changes (lines 48 thru 56 of your code sample) but it didn't do what I was expecting. Here's what I implemented before but the widget loads with the Search Layer (index 0) and I didn't quite understand how this gets the url parameter and apply the logic to set that search layer based upon that parameter value.

} else if(myObject.slayer && !myObject.esearch) {
              var valuesObj2 = lang.clone(this.config.layers[myObject.slayer].expressions.expression[myObject.exprnum || 0].values.value);
              this.paramsDijit.build(valuesObj2, this.resultLayers[myObject.slayer], this.config.layers[myObject.slayer].url,
                                   this.config.layers[myObject.slayer].definitionexpression);
              on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
                if(attribOptions.length > 1){
                  this.selectLayerAttribute.set('value', myObject.slayer);
                }
              }));
            }

James,

  That code is under the assumption that you are using the predefined url parameters that the widget is developed to use like slayer

?slayer=0&exprnum=1

Where slayer is the index of a configured search layer.

Ah, I think I understand and will give that a go.  My bad.

Thanks again.

Edit: I think what I implemented will work and has much less alterations made to the original codebase and probably less chance of negative impacting that excellent widget!

            //Altered 9/17/2018 for Insights
            else if (myObject.queryLayer && !myObject.esearch) {
                if (myObject.queryLayer == 'structure') {
                    myObject.slayer = 1
                } else if (myObject.queryLayer == 'site') {
                    myObject.slayer = 0
                }
                    var valuesObj2 = lang.clone(this.config.layers[myObject.slayer].expressions.expression[myObject.exprnum || 0].values.value);
                    this.paramsDijit.build(valuesObj2, this.resultLayers[myObject.slayer], this.config.layers[myObject.slayer].url,
                                         this.config.layers[myObject.slayer].definitionexpression);
                    on.once(this.paramsDijit, 'param-ready', lang.hitch(this, function () {
                        if (attribOptions.length > 1) {
                            this.selectLayerAttribute.set('value', myObject.slayer);
                        }
                    }));
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I love the functionality of removing <null> values from the results popups, but the format of those windows are hard to read.  Where can I find the bit of code that removes the null values from results so that I may try and put it in my popup?

Thanks for all you do.

Search the widget.js for 

if(lyrHideNullValues && value === ""){

Hi Robert, Thanks for the great widget. We are wondering if we are missing something. We have added the driving directions widget and since enabling credit usage in the dev settings for that widget, the eSearch widget is showing a Save to my Content option under the result list option drop down. We would prefer to not have this option shown, but we can't find a setting to disable this functionality. It appears it is part of the select widget functionality that can be disabled, but with your widget it doesn't show with the other export options such as GeoJSON, CSV, etc.

Any help would be appreciated. 

Thanks,

Jason

Jason,

   It is not part of my widgets setting because I do not add that option in my widget, it is getting added my the WAB App itself.

Hi Robert, I'm trying to upgrade your widget from 2.7 to 2.9.  I've copied the new one into the folders, apps and stemapp but the widget is still showing as version 2.7.  Is the new download link correct?  Thanks!

Hmm. Somehow the zip did not get updated. Try downloading again.

thanks Robert! I thought I was going crazy.

So, I am terribly sorry if this has been asked before but I had a question about passing a dynamic URL into the Enhanced Search widget. Is this possible? We have an internal appraisal system that has a button that passes the Parcel Number of the property card they are viewing and then opens up a JavaScript app where that Parcel Number has already been passed into the search function. We have been running into issues using this same logic in the out of the box Esri search widget in Web AppBuilder and so I wanted to see if there was a way to pass those search values into your widget to product the same results? Thanks!

Carissa Signore

Summit County, Ohio GIS

Carissa,

   You will want to consult the help documents url search section:

https://gis.calhouncounty.org/WAB/V2.9/widgets/eSearch/help/eSearch_Help.htm#GUID-ECDFB290-706C-4609... 

The eSearch allows you to search configured layers in the widget using defined url parameters.

Robert,

Wonderful this worked perfectly. Will bookmark this for future reference. Thank you!

Carissa Signore

Summit County, Ohio GIS

Hello Robert,

Thank you for all the work on the Enhanced Search Widget.

Is there a way to disable the "Save to My Content" option on the Results Tab?

Regards,

Jane.

Jane,

  Currently no. I am not adding this to the menu it is something that is coming default in WAB. I will have to add a setting to remove this in a future release.

Thank you Robert,

regards,

Jane.

Hi Robert,

I am using eSearch version 2.3 in an application. On running the search, the Results Tab shows all selected attributes in one line and one has to scroll through to read the values. The help document and the demo site shows the attributes displayed as one per line. What am I doing wrong here? The screenshot of my application is attached for your reference.

Look forward to your help.

Thanks.

Vatsal

Results Tab - eSearch

Hi Robert,

Another quick question. Is there a way to disable to MapExtent checkbox?

Thanks,

Vatsal

Sure there is a configuration option for this when setting up the widget.

Thanks for the response Robert, but which one is that option?

My more serious issue is with the Results Tab showing all attributes in one line instead of one per line. I am using WAB and eSearch version 2.3.

Thanks and regards,

Vatsal

Sent from my iPhone

Vastal,

   As I have shown you in my previous reply (the image showing 2.3 displaying results correctly) the 2.3 version of the eSearch does not show results on one line like your app is. So it has to be some customization you have made to your app that is affecting the results display. As for the extent question The setting is shown in the help documentation:

https://gis.calhouncounty.org/WAB/V2.3/widgets/eSearch/help/eSearch_Help.htm#GUID-43431E18-3AA7-4C19... 

"Enable limit results to map extent by default"

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