Enhanced Search Widget Version 2.23.1 - 11/22/22

545883
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
RobertScheitlin__GISP
MVP Emeritus

Steve,

   There is no ability to run code inside a sqltext like that. You would have to do the replace work in the widgets code not the configuration file.

LeoLadefian5
Occasional Contributor II

Are hosted feature services supported? I can't seem to get a service url to work from one.

RobertScheitlin__GISP
MVP Emeritus

Leo,

  Absolutely. I just tested to confirm.

LeoLadefian5
Occasional Contributor II

Thanks! How did you get the full URL for a HFS, Google chrome gives me a long url with a "..." at the end.

LeoLadefian5
Occasional Contributor II

oops, I think i was copying the token code.

RobertScheitlin__GISP
MVP Emeritus

You go to your AGOL > my content > layers > then view item details for that layer  > Service URL link

LeoLadefian5
Occasional Contributor II

Hi Robert, I'm getting a new error with the eSearch buffer: perhaps I should switch to my own geometry server?

AdamGebhart
Occasional Contributor III

Robert Scheitlin, GISP

Is there any chance you can give me some pointers here... and possibly consider a modification to the interface in a future release?

I've received a couple requests from our staff over the last few months to update how the 'By Spatial' tab appears.  They would like to know if it's possible to move the 'Apply Buffer' button below the input buffer distance box.  I think some of the users are mistaking it simply for an image, or just don't know that you enter the distance first, then the button.  In essence, it would look like 'Search entities of' area.  Also, would it be possible add numbers before each item to help give the user an idea of the full progression?  For example:

I have no idea how much work this would entail or if it will mess up something else in your setup but I just want to see if it's possible.  If it's not something you'd want to modify, and if you have tips for how to accomplish it, I'd be glad to try them. 

VatsalDave2
New Contributor

Is it possible to filter results based on previous expressions as is done in Query and Filter widgets? I use Enhanced Search widget 2.3.

RobertScheitlin__GISP
MVP Emeritus

Adam,

  I will look into making the spatial search more user friendly in a future release (for those who refuse to read help docs).

Help - Enhanced Search widget | Spatial Search 

RobertScheitlin__GISP
MVP Emeritus

Vatsal,

  No that is not an option in the eSearch currently.

JamesMarok1
New Contributor III

I'm trying to set Point as the default search option in the widget but keep getting an creation error:

I found the graphical searchoptions in the config but I don't see where to edit for Point

  "graphicalsearchoptions": {
    "enablepointselect": true,
    "enablelineselect": true,
    "enablepolylineselect": true,
    "enableextentselect": true,
    "enablecircleselect": true,
    "enablepolyselect": true,
    "showmultigraphicsgraphicaloption": true,
    "showaddtolerancegraphicaloption": true,
    "showaddsqltextgraphicaloption": true,
    "showbuffergraphicaloption": true,
    "buffercheckedbydefaultgraphicaloption": false,
    "multipartgraphicsearchchecked": false,
    "addpointtolerancechecked": false,
    "keepgraphicalsearchenabled": true

Is there someway to edit the config or maybe something I'm missing that is creating the error?

VatsalDave2
New Contributor

Thanks a lot, Robert for the widgets that you have created.

They have made things so much simpler!

Please let me know if there is any plan to add that functionality.

Thanks once again for the great work you are doing.

With regards,

Vatsal Dave

RobertScheitlin__GISP
MVP Emeritus

James,

   I am not sure why you are getting an error. The config for it should look like this (autoactivatedtool):

"graphicalsearchoptions": {
  "enablepointselect": true,
  "enablelineselect": true,
  "enablepolylineselect": true,
  "enableextentselect": true,
  "enablecircleselect": true,
  "enablepolyselect": true,
  "showmultigraphicsgraphicaloption": true,
  "showaddtolerancegraphicaloption": true,
  "showaddsqltextgraphicaloption": true,
  "showbuffergraphicaloption": true,
  "buffercheckedbydefaultgraphicaloption": false,
  "autoactivatedtool": "point"
},

JamesMarok1
New Contributor III

I get the error every time I set the Initial View: By Shape then try to select a geometry feature like Point to be default, does this work for you?

RobertScheitlin__GISP
MVP Emeritus

James,

   The error is a simple fix if you want to correct this before I release the next version:,In the Widget.js postCreate function find the line 175(this._initDrawBox();) and cut it from there and then add a new line above line 170 (this._initTabContainer();) and paste it there. That is it you are now good to go.

AdamGebhart
Occasional Contributor III

Thanks, Robert.  I might go ahead and try it myself and see what I can come up with and avoid messing up something else.

I also have a Help doc for our entire site that includes steps for eSearch buffering and either people don't use it or don't know it's there.  Looks like I need to do a better job of notifying them of both Help docs.

JamesMarok1
New Contributor III

Ok I think I have determined its an issue in the new 2.4 that is my problem if you go to my old site and Select Point then click back to the Value tab in ESearch you can still click on parcels in the map and get results from the By Shape Point

Auglaize County Mapping Portal 

However when I set it up in the new 2.4 Edition site I am working on it does not work. (even with the default point enabled)

Auglaize County Mapping Portal  2.4

Basically an user is forced to go back to the Shape Tab to get results all the time when I prefer then to just be able to click the map.

RobertScheitlin__GISP
MVP Emeritus

James,

   In the new 2.4 version of your app I do not see the code change I suggested above made to the esearch widget. So naturally it would still have the issue.

JamesMarok1
New Contributor III

Sorry your correct I didn't deploy it to the site because it didn't seem to do anything in my builder I deployed it now. Still not working.

this.resultLayers = [];
        this.layerUniqueCache = {};
        this._initResultFormatString();
        this._initDrawBox();
        this._initTabContainer();
        this._initBufferUnits();
        this._initSpatialRelationships();
        this._initLayerSelect();
        this._initProgressBar();
        this._initCheckForSupportedWidgets();
        this._combineRadioCheckBoxWithLabel();

Sorry for needing so much hand holding 🙂

RobertScheitlin__GISP
MVP Emeritus

James,

   The error appeared when you tried to set the initial view to by shape. I don't see where your app has the initial view set to by shape.

JamesMarok1
New Contributor III

I guess I being misleading, and this is another issue, I solved the By Shape and Point setting issue with your original code but I was requested by users to make it work like the old site with the Attribute Tab active and the Point selected so they could search for a parcel, then click on the surrounding ones to get information. I didn't realize it didn't work the same until after the By Shape and Point(cause with 2.12. I can't have the point selected as default), I was going to make that default but users wanted the By Value to be first thing they see.

RobertScheitlin__GISP
MVP Emeritus

James,

  So they are wanting "By Value" first and then have "By Shape" Point active as well? I can see this causing issues.

JamesMarok1
New Contributor III

Yes, and No the functionality I want exists in the old site 2.1.2 but you have to activate the Point before you can click around(so you can find new parcels even while on Value and Results Tab ie I can just click around the make while on the Results tab and get new parcel records), I was just trying to get Point active as soon as the site loads, but in 2.4 it seems to work differently and its only be active when on the By Shape Tab.

Hope this is clear.

RobertScheitlin__GISP
MVP Emeritus

James,  that was actually a bug that got fixed in a latter release. Some people were complaining that the drawing tool was active even though they were not on the by shape tab (exactly what you are wanting).

JamesMarok1
New Contributor III

LoL that is interesting, well I guess I can rollback to 2.1.2 for now because that's how my users want it to work. Thanks for the info.

RobertScheitlin__GISP
MVP Emeritus

James,

  I would not go that far. Let me see if I can find the code change  I made for that bug and you can just reverse the change in your apps code.

RobertScheitlin__GISP
MVP Emeritus

James,

   The change to make to allow what you are after is in the Widget.js > _initTabContainer function:

//The way the code looks in eSearch 2.4
        if (initView === "text" && this.attribTab) {
          this.selTab = this.nls.selectByAttribute;
        } else if (initView === "graphical" && this.shapeTab) {
          this.selTab = this.nls.selectFeatures;
          if(this.autoactivatedtool){
            this.drawBox.activate(this.autoactivatedtool.toUpperCase());
          }
        }

//The way it needs to looks for you
        if (initView === "text" && this.attribTab) {
          this.selTab = this.nls.selectByAttribute;
        } else if (initView === "graphical" && this.shapeTab) {
          this.selTab = this.nls.selectFeatures;
        }
        if(this.autoactivatedtool){
          this.drawBox.activate(this.autoactivatedtool.toUpperCase());
        }
JamesMarok1
New Contributor III

OK that solved my original issue of the site loading on the Value Tab but having the Point enabled on the By Shape and just clicking on the map, that works wonderfully now. But after I get the results I can't select another parcel without going back to the Shape Tab I seem to be missing something?

RobertScheitlin__GISP
MVP Emeritus

James,

   on the graphical search setting page there is this option "Keep graphical search tool enabled after each draw" make sure that is checked.

JamesMarok1
New Contributor III

this.keepgraphicalsearchenabled = this.config.graphicalsearchoptions.keepgraphicalsearchenabled || true;  ?? actually was the very first thing I tried before posting again.

RobertScheitlin__GISP
MVP Emeritus

James,

   OK moving those inits around earlier has some things out of wack. Make this change (add line 2 to the _initDrawBox function):

      _initDrawBox: function () {
        this.keepgraphicalsearchenabled = this.config.graphicalsearchoptions.keepgraphicalsearchenabled || false;
JamesMarok1
New Contributor III

You sir, are the eight wonder of the world!!

Anish_Adhikari
Occasional Contributor

I am having a minor issue when using Google Chrome with the widget. I am using version 2.3 of the widget and was able to reproduce the issue on 2.4 as well. Basically when I first launch the application and perform a search using chrome and click on the Results menu button after getting search results, some of the menu items look garbled as shown in the picture. If I click on the menu second time, it looks normal. It looks normal for the entire session no matter how many times I use the widget. It reappears when I start a new session or refresh the browser. I am using the latest version of chrome browser. This issue has not appeared in any other browsers. I used Search By Value. It also does not appear when the widget is not a header controller widget.

Here it looks garbled on first click.

.

Here is looks OK on second click.

RobertScheitlin__GISP
MVP Emeritus

Anish,

   Thanks for reporting this it will be fixed in the next release. You can fix it now by adding this css rule to the eSearch/css/style.css file:

.popup-menu .popup-menu-item .label {
  display: block;
}
Anish_Adhikari
Occasional Contributor

 Robert,

Thanks for the speedy reply. The garbled problem has been solved with the new css rule. However, It is cutting off the last few characters of View in Attribute Table menu item. See screenshot below.

RobertScheitlin__GISP
MVP Emeritus

Correct the real problem is in the popup menu class that is out of the control of my widget (WAB core). It seems that it is not calculating the menus width properly the first time it is shown but subsequent shows do calculate correctly.

NicholasBarger
Occasional Contributor III

Good Morning Robert,

Quick Question.  I have a couple users telling me they cannot see the text input box in the latest version of the eSearch tool... have you run into this before.  I've done the typical trouble shooting of having them clear their browser cache and checking all ports.  I'm wondering if their organization is blocking something that the tool needs for rendering the widget.  Thoughts?

I have not been able to replicate this problem.  It works fine on phones and every other external device that I have tried.

One more question.  This is something I noticed with the upgrade.  We moved from WAB 2.1 to 2.4 so I rebuilt the eSearch tool.  Anyways, when I search for 1100 N Atherton St in our buildings data I get multiple results... 1100 N Atherton St and 1100 S Atherton St.  Any ideas here?  I clearly enter N and not S, and the value would be 1100 N Atherton St.  I am using the "LIKE" operator in the query

"Upper(ADDRESS) LIKE Upper('%[value]%')",

Here is a public facing website...

ArcGIS Web Application 

Thanks in advance.

Nick

NicholasBarger
Occasional Contributor III

So I think I figured it out.  For some reason in WAB 2.1 when I used the operator contains it didn't give me the same results.  It appears that now I need to use Starts with to get the same results as before.  A little strange given the code between the two versions is the same.

In any case, that solved my problems for the search.

I also narrowed down the text box not showing up to the end users network restricting something...still not sure what it is blocking.

RobertScheitlin__GISP
MVP Emeritus

Nick,

   OK glad you go the search worked out. The textboxes is an issue I have never seen or had reported before.

NicholasBarger
Occasional Contributor III

Robert,

Here is what I have found.  In the 2.1 version of the eSearch widget I used CONTAINS as the operator with this expression... "Upper(ADDRESS) LIKE Upper('%[value]%')"

Now with the 2.4 version of the tool it appears I need to change the operator to StartsWith and then use this expression "Upper(ADDRESS) LIKE Upper('%[value]%')" to get the same behavior.  I'm guessing something changed slightly in the coding.

I was able to work around it...but wanted you to know.  Here is an simple example of what I was seeing.

I would search for 1100 N ATHERTON ST and my results would be...

1100 N ATHERTON ST

1100 S ATHERTON ST

 

Using the StartsWith and the same equation I get just 1100 N ATHERTON ST... which is what I would expect.

RobertScheitlin__GISP
MVP Emeritus

Nick,

   I am just not seeing that at all in the 2.4 version.

  • constains = Upper(SITEADDRESS) LIKE Upper('%[value]%')
  • starts with = Upper(SITEADDRESS) LIKE Upper('[value]%')
  • ends with = Upper(SITEADDRESS) LIKE Upper('%[value]')

I am not sure why you are seeing 

  • starts with = Upper(SITEADDRESS) LIKE Upper('%[value]%')
AmalHorchi
New Contributor II

Hi Robert , 

Please is there any widget in javascript  that replaces the query generator widget  in flex ? 

RobertScheitlin__GISP
MVP Emeritus

Nope. No one has developed that one so far.

AmalHorchi
New Contributor II

Thanks Robert so much .

On Tue, May 9, 2017 at 3:23 PM, Robert Scheitlin, GISP <geonet@esri.com>

NicholasBarger
Occasional Contributor III

I'm sorry... I must have confused you a little.  You care correct in the way it formats the different queries.  What I was getting at was in 2.1 I used contains and it behaved in a certain manor.  In the 2.4WAB / Widget it behaved differently.  My fix for the problem was to use the starts with operator and the contains query.  I had to change it in the code.  For some reason the contains produced strange results.  When I used starts with and the contains query it behaved like it did in 2.1

RobertScheitlin__GISP
MVP Emeritus

Nick,

  OK, that is strange. I would never have expected 2.1 to act differently since the SQL statement is the same.

Anish_Adhikari
Occasional Contributor

Hi Robert,

I was wondering if it is possible to disable displaying the Search Layer dropdown arrow button and dropdown menu when there is only one search layer configured in the eSearch widget, Basically it would be helpful for our end users if they could just see the static box with the search layer name faded without the dropdown menu just like the font style used in the "Tax ID is" heading. Thank You.

 

RyanKelso
Occasional Contributor III

Robert,

I ran into the same issue as Anish with the text being messed up on the eSearch results menu.  Thankfully I remembered it being mentioned here and I'm going to apply the fix you already posted.  Just in case it's useful information, I wanted to point out that I noticed the font in this menu is different between 2.1 and 2.4, with 2.4 using a font that is a bit wider.

Nicole_Ueberschär
Esri Regular Contributor

Hi Anish and Robert, 

I was looking for almost the same like Anish. I only have one search layer and only one Search Expression defined so there is no need to display the select field for the search layer. I tried just to remove it from the Widget.html but I guess then it is still looking for the "result" from the select field and can't find it. Do you have a hint for me how to accomplish what I need?

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