Enhanced Search Widget Version 2.23.1 - 11/22/22

518543
2820
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

Strange I just downloaded the widget again from here and the French strings.js file is updated with the escaped single quotes.

I'm sorry but your tip doesn't work . I try with the console browser and i got this

KARIMLABIDI_0-1632149091151.png

 

@KARIMLABIDI 

So after you have updated the strings.js files to escape the single quotes, saved those changes and restarted WAB you are still receiving those errors in your browsers web console?

yes ,still the same

KARIMLABIDI_0-1632150347194.png

 

@KARIMLABIDI 

That means that you are not updating the files that that app is using or that you are using cached versions of the file in your web browser.

Be sure that you have made those changes to the app you are testing in. So for example on my machine the path looks like this: F:\web-appbuilder-2.20\server\apps\2\widgets\eSearch\setting\nls\fr\strings.js.

"2" being the application number (When i look at the url for WAB it looks like this myMachineName:3344/webappbuilder/?id=2.

If you are sure that you have done this then clear your browser cache and restart WAB (meaning close your bowser and the "Web AppBuilder for ArcGIS" Command Prompt window and re-exectute the startup.bat).

ok Robert, i have to check everything and I come back at you.

Thanks for your help

@RobertScheitlin__GISP 

ok it works but now it's in english 😉

KARIMLABIDI_0-1632302912996.png

i have to change the Json but which one?

thanks

OK, So as I mentioned before change this file.

[install directory]\server\apps\[App#]\widgets\eSearch\setting\nls\fr\strings.js.

Hello @RobertScheitlin__GISP  I have clean everything and the widget works in english but not in french. 

@KARIMLABIDI 

So did you re-enable the French locale?

server\apps\[App#]\widgets\eSearch\setting\nls\strings.js

Change "fr": 0, to 1

yes but ultimately it does not matter. The configuration is in english but the tool is in French for the user, it is the main one.

Thank you for your help and it's a great widget!

KARIMLABIDI_0-1632400537159.png

 

@RobertScheitlin__GISP 

Robert,

Good morning!

Do you have experience to directly read a CSV file from a local driver with a customer widget? I tried to use dojo/node!fs plug in but I got a message "cannot find node.js require". It looks like dojo loader cannot find node.js.  

Jin

Robert, 

We tried to use Enhanced Search widget to search a feature class with attachment. We set up the following line for the layer of the feature class with attachment in the configuration file. After we search that feature class, the links to the attachments in the search pane and popup window did not show up. Did we miss something else? 

"showattachments": true

@LixinHuang 

Once the layer is configured to showattachments true in the widgets layer settings then once the layer is searched the OID (object Id) is used to make a query to the REST service for attachments and a link will be added to the search results. So the answer to your question is yes assuming your layers REST Service has the 

Has Attachments: true

In the rest services directory page for that layer.

Robert,

The layer REST service has the following setting. The links to the attachment did not show up the search result. 

Has Attachments: true

@LixinHuang 

Sorry I said that the attachments would appear in the eSearch Results but I meant to say they will appear in the results popup. So click on the result record to make the popup appear and in the popup the attachment link will appear.

Hello,

I'm using the enhanced search widget through basic web app builder via arcgis enterprise version 10.8.1. I have a map service with a layer and a table of related records. When I configure the widget for related records it sees that a relationship exists and it allows me to add the fields from the related table. However when I select records or try to review related records the option is grayed out and I don't see an option to view related records after a search is performed. Is there an additional configuration step I am missing to related records?

Thank you

nelsmickaelson_0-1635522108056.png

 

I am getting the below error while opening the widget 

mohannainar1_0-1638190677925.png

I created application from web app builder developer edition

mohannainar1_1-1638190720233.png

WAB version 2.21 and ArcGIS Enterprise 10.8.1

 

@nelsmickaelson 

From the eSearch help documentation:

https://gis.calhouncounty.org/WAB/V2.21/widgets/eSearch/widgets/eSearch/help/eSearch_Help.htm

  • The Show Relates command opens and sends the search relates to the Attribute Table widget.

So you need to have a AT widget in your app and the relates will be shown there

@mohannainar1 

What version of version of the widget are you using? What are the error(s) in the browsers web console?

@RobertScheitlin__GISP 

"version": "2.21.1"

Console error :

mohannainar1_0-1638268663378.png

 

 

@mohannainar1 

Can you share the theme portion of your apps main config.json file? For example:

  "theme": {
    "name": "FoldableTheme",
    "styles": [
      "yellow",
      "default",
      "black",
      "blue",
      "cyan",
      "green",
      "purple",
      "red"
    ],
    "version": "2.21",
    "sharedTheme": {
      "isPortalSupport": true,
      "useHeader": false,
      "useLogo": false
    },
    "customStyles": {
      "mainBackgroundColor": "#5a6b4d"
    }
  },

@RobertScheitlin__GISP 

find the details below.

 

{
"theme": {
"name": "FoldableTheme",
"styles": [
"yellow",
"default",
"black",
"blue",
"cyan",
"green",
"purple",
"red"
],
"version": "2.21",
"sharedTheme": {
"isPortalSupport": true,
"useHeader": true,
"useLogo": false
},
"customStyles": {
"mainBackgroundColor": "no-color"
}
},

@mohannainar1 

OK I have never seen the "mainBackgroundColor" set to "no-color" before now so the code is not handling that correctly. You can make this change in the widget.js file of the eSearch widget or wait for a new fixed version to be released.

      _addCustomStyle: function(theme) {
        var customStyles = lang.getObject('customStyles', false, theme);
        if(!customStyles || !customStyles.mainBackgroundColor ||
          customStyles.mainBackgroundColor === "" || customStyles.mainBackgroundColor === "no-color"){
          return;
        }
.....

@RobertScheitlin__GISP  I Changed the background color to valid value, now the widget is working. Thanks a lot for the quick solution. 

Great tool! I was wondering with this workflow, is there anyway for when you search by values and pan to those values, to have certain rest services display on the map?

My use case is airports. I am using the search by value, which i configure to be the attribute name of the airport. As it returns the result, on top of paning to that result, i would like to call certain layers from a previous published map rest service to then display on the map.

Is there any straightforward way to accomplish this? I currently don't have that layer on my map in the web app builder environment  and looking to call it in on the fly. If its more easily accomplished by calling on layers in a published web map or something like that, i can easily go that route too. Just looking for some guidance on how best to accomplish this.

@RaoulComaduran2 

That is not something that the widget is capable of without customization. I can provide you some basic guidance, but ultimately this is something you will have to code yourself.

Hey Robert,

Yeah i realize that may be the case. Any guidance you can provide that might get me close would be amazing! Thank you again and appreciate the response!

I'm using the latest version of the widget.  When I zoom in, and then use the search by shape with a point it selects over 2000 records, no the one record it should.  This only happens when I'm zoomed into my map very closely.

PriscillaThoopthong_0-1638808697386.png

 

It runs for a very long time and then comes back with this:

PriscillaThoopthong_0-1638807678566.png

using debugging tools my query object looks like this:

PriscillaThoopthong_1-1638807750445.png

but the actual query it send through (according to the network tab in the debug tools) looks like this:

PriscillaThoopthong_2-1638808069541.png

 

It creates rings instead of points:  

{"rings":[[[-9186792.979314081,3178304.043410247],[-9186792.979314081,3178303.1180557827],[20037508.342788905,3178303.1180557827],[20037508.342788905,3178304.043410247],[-9186792.979314081,3178304.043410247]],[[-20037508.342788905,3178304.043410247],[-20037508.342788905,3178303.1180557827],[-9186793.904668545,3178303.1180557827],[-9186793.904668545,3178304.043410247],[-20037508.342788905,3178304.043410247]]],"spatialReference":{"wkid":102100}}

 

 

@RaoulComaduran2 

OK so if you are wanting to add the layer after the search is complete and the zoom is done then you need to add the code that will add the layer to the map in the widget.js _zoomAndClose function. But if you have set the search results to open in the Attribute Table widget then the location to add your layer code is in the _openResultInAttributeTable function. Adding the layer is as simple as:

 

@PriscillaThoopthong 

An extent is applied to the point graphical search based on how the widget is configured. If you do not want the point to have a search tolerance added to it then uncheck the "Add search tolerance to point selection" on the widget.

Thank you Robert.  I had just figured that out myself.  But let me ask you, if my search tolerance is set to 6 why would it select the parcels that it's selecting?

@PriscillaThoopthong 

No it should not. Seems like I remember on other person have an issue like this and the issue had to do with some bad geometry in their service they were searching. Sorry that was a long time ago so I don't recall much of the details.

It doesn't seem to matter which parcel I click on.  It always seems to do the x coordinate like that and not the y.  Strange

Got it. Thanks!

Hi Robert,

I recently upgraded our server from ArcGIS Enterprise 10.7.1 to 10.9.1. I would like to also update my eSearch widget, which is at 2.13. What is the best way to upgrade without having to redo my configuration?

Thanks,

Kindra

 

Hi Robert,

 

I tested eSearch version 2.21.1 on Web AppBuilder version 2.22.

 

The Max Row limit to 10 rows is not working.

 

DavidDas__GISP_0-1645760660420.png

 

 

Here is the Search Layer drop down under the By Value Tab

 

DavidDas__GISP_1-1645760660426.png

 

 

Here is the Search Features of drop down under the By Spatial Tab

 

DavidDas__GISP_2-1645760660431.png

 

 

 

Here is the Search Layer drop down under the By Shape Tab

 

DavidDas__GISP_3-1645760660437.png

 

 

If you could tell me exactly what changes to make to the code, I could modify it myself till you release a new version.

 

Best regards,

 

David Das

 

 

@KindraBlair 

I am not a ArcGIS Enterprise user, but. You just need to follow the steps you would normally use for adding a custom widget and replace the eSearch widget with the new version. As far as apps you have that have eSearch configured they will remain configured as their configuration file is separate from the eSearch widget folder. 

@DavidDas__GISP 

The change is simple. In the Widget.html file make these changes (adding data-dojo-props="maxHeight:200"):

        <select class="esearch-select-graphic" style="margin-bottom:10px;float:left;" data-dojo-attach-point="selectLayerGraphical"
          data-dojo-type="dijit/form/Select" data-dojo-props="maxHeight:200"></select>
....
        <select class="esearch-select-attrib" style="margin-bottom:10px;float:left;" data-dojo-attach-point="selectLayerAttribute"
          data-dojo-type="dijit/form/Select" data-dojo-props="maxHeight:200"></select>
....
        <select class="select-layer-spatial" data-dojo-attach-point="selectLayerSpatial" data-dojo-type="dijit/form/Select" data-dojo-props="maxHeight:200"></select>

 

 

Hi Robert,

 

Success!!

 

Thanks so much for your expert tips.

 

I learned something new today.

 

I set the maxHeight property to 235 to get it exactly the way I wanted.

 

data-dojo-props="maxHeight:235"

 

By Shape Tab

 

DavidDas__GISP_0-1645831264826.png

 

 

By Value Tab

 

DavidDas__GISP_1-1645831264830.png

 

 

By Spatial Tab

 

DavidDas__GISP_2-1645831264834.png

 

 

I had no clue that you could set these Dojo Properties in the Widget.html file.

 

I expanded the width of the Text Box for entering the Buffer Value under the By Shape Tab from 50px to 80px.

 

I can now enter a buffer distance of 1,000 feet without the value being cut off.

 

DavidDas__GISP_3-1645831264839.png

 

 

I can hardly wait to see this Widget ported to the Experience Builder.

It would become the centerpiece of all Experience Builder apps.

 

The simplicity of the User Interface in the Enhanced Search Widget belies the complex graphical and spatial searches one can perform with just a few mouse clicks.

 

Best regards,

 

David Das

 

 

 

Hello,

I don't see related data. 

I have a map service with a layer and a table of related records. When I configure the widget for related records it sees that a relationship exists and it allows me to add the fields from the related table but don't show in Search by value tab.

Console error :

KristinaMarkocevic_0-1647331643389.png

 

zrs

In addition to @KristinaMarkocevic's comment I have the same problem. This error shows up if the attribute table is not open prior to launching the eSearch widget. 

But if the attribut table is open the next issue is caused by code few lines beneath in the _createLayerAndExecuteQuery method. Namely, the relateId argument that is supplied to the method is the id of the related object but the method tries to query the relates array as if it was tthe array index and breaks.

zrs_0-1647530367388.png

 

I tried the eSearch widget version 2.21.1 with few Web AppBuilder and ArcGIS Enterprise versions:

ArcGIS Enterprise 10.8.1 - Web AppBuilder 2.19 - 2.21 - 2.23
ArcGIS Enterprise 10.9.1 - Web AppBuilder 2.21 - 2.23

Any help would be appreciated.

@KristinaMarkocevic 

From the widgets documentation:

  • The Show Relates command opens and sends the search relates to the Attribute Table widget.

https://gis.calhouncounty.org/WAB/V2.21/widgets/eSearch/widgets/eSearch/help/eSearch_Help.htm

The error you have posted above is pointing to there being an issue with not being able to find the ObjectID field in the search results.

@zrs 

  I have been busy developing this widget in Experience Builder, so I am just now getting to respond. I will have to test what you are reporting. Once I find the issue I will fix it and release a V2.23 of this widget.

Is there a way to have the results of the search work like the PopupPanel widget? So instead of having a long list of the search results, it would display each result where you would have the ability to click Next or Previous?

Nope

Is there a way to make the popup results moveable?  

@PriscillaThoopthong 

@KeithMiller3 just created a widget to allow all popups in WAB to be movable.

 

Wonderful!  Thank you so much.  Is there a way to make this so it starts automatically without having to click on it or have it as the open widget?

@PriscillaThoopthong 

Same as any widget you want to "open at start"

https://developers.arcgis.com/web-appbuilder/guide/widgets-tab.htm

The widget added from the widgets collection can be set to open automatically when the app starts. To do so, click the dot on the widget to change it to dark green. A maximum of two widgets can open automatically: one is on the controller and another in the placeholder.

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