Enhanced Search Widget Version 2.23.1 - 11/22/22

518498
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

I must be missing something

how do I get the eSearch widget to show up in my app?

I added the eSearch folder to the client\stemapp\widgets

folder added the label and url in the config.json file and

the widget does not show up on the interface is there something I'm missing?

Cattyann,

Are you using the Developer version of WAB or are you using a downloaded app from AGOL?

If you are using the Developer version then once you have added the eSearch folder to the client\stemapp\widgets folder in your App, there is no need to manually add the widget to the config.json. All you do is go to the widgets tab and click one of the 1,2,3 buttons and choose the eSearch widget from the list of available widget.

Is there a way to export the search results to csv? Via the attribute table perhaps?

EDIT: I figured out how to open the result in the attribute table but Export to CSV is not available. Any ideas?

Chris,

   Currently No. It is a feature that is on the to do list though.

After you open the attribute table for the search results, select all the records in the attribute table and then the export to CSV option should become available.

It would be nice to have a "select all" option to make that easier to do.

I was playing with it and if you hit "Select Records on All Pages" it will select the whole table. Gives me an error that the data isn't available but it all selects and exports just fine so I don't know what that's about. It seems like an error in the Attribute Table widget.

Hey Robert,

I am getting this error when trying to configure the eSearch widget in WAB Developers Edition "Create Widget setting page error.widgets/eSearch/widget".

eSearcherror.JPG

After I click ok the dotted circle in the middle of the configuration GUI just keeps spinning and spinning.

Any thoughts?

Nathan,

  1. Are you running the 1.x release of WAB Developer version?
  2. What version of the eSearch are you attempting to use?
  3. What are the steps you followed to add the eSearch widget to your WAB Developer version?

1. WAB 1.0 Developer Edition

2. 1.0.3

3. I unzipped the eSearch.zip, copied the eSearch folder to client\stemapp\widgets\, in WAB added the widget to the header controller, then clicked on the edit "pencil" icon.  The configuration screen pops up and I get that error.

Nathan,

   Can you open the developer tools once you get that error for what ever flavor of browser you are using (IE: F12, Chrome and FireFox use Ctrl + Shift + I) and provide a screenshot of the console error?

Robert,

Here is the only error that I see.  This is from Chrome.

eSearcherror1.JPG

Thanks Robert for this widget. I'm running the dev edition AWAB

I am able to configure the search via GUI and can see the JSON being referenced in:

configs/esearch/config_Search.json

My results are not displaying in the results pane even though it has found and selected the records, nor are they zooming. (The map service itself is not actually part of the webmap itself though)

Both the basemap and the layer I have configured are WKID 102100  (3857).

Your preconfigured map services do work, just mine doesn't.

I also tried this with a layer that is part of the web map, with scale visiblity active. That shouldn't matter though.

Is the only configuration point the config_Search.json and not the actual config.json included with the widget?

Whether I find the features via spatial or attribute search, the results don't show in the pane, just the number of records its found... any ideas?

here's the json from one of the search parameters.

{

      "name": "Fire Hydrant",

      "url": "http://74.216.225.69/arcgis/rest/services/FireHydrantInspection/MapServer/0",

      "definitionexpression": "",

      "spatialsearchlayer": true,

      "expressions": {

        "expression": [

          {

            "alias": "Hydrant Condition",

            "textsearchlabel": "Hydrant condition",

            "values": {

              "value": [

                {

                  "fieldObj": {

                    "name": "HYDRCOND",

                    "label": "Hydrant Condition",

                    "shortType": "string",

                    "type": "esriFieldTypeString"

                  },

                  "valueObj": {

                    "value": "<Null>"

                  },

                  "prompt": "Hydrant Condition is",

                  "textsearchhint": "Failed",

                  "sqltext": "HYDRCOND = '[value]'",

                  "operation": "stringOperatorIs",

                  "uniquevalsfromfield": "HYDRCOND"

                }

              ]

            }

          }

        ]

      },

      "titlefield": "INSSTART",

      "fields": {

        "all": false,

        "field": [

          {

            "name": "INSSTART",

            "alias": "Start DateTime",

            "isdate": true

          },

          {

            "name": "HYDRCOND",

            "alias": "Hydrant Condition"

          },

          {

            "name": "OPERHARD",

            "alias": "Hard to Operate",

            "isnumber": true

          },

          {

            "name": "OPERABLE",

            "alias": "Operable",

            "isnumber": true

          },

          {

            "name": "CORRODED",

            "alias": "Corroded",

            "isnumber": true

          },

          {

            "name": "FLOW",

            "alias": "Flow Rate (LPM)",

            "isnumber": true

          },

          {

            "name": "PRESSURE",

            "alias": "Pressure (KpA)",

            "isnumber": true

          },

          {

            "name": "MTCERQRD",

            "alias": "Maintenance Required"

          },

          {

            "name": "NOTES",

            "alias": "Notes"

          },

          {

            "name": "INSEND",

            "alias": "End DateTime",

            "isdate": true

          },

          {

            "name": "WORKKEY",

            "alias": "Workorder ID"

          },

          {

            "name": "INSPECTID",

            "alias": "Inspection ID"

          },

          {

            "name": "FACILITYKEY",

            "alias": "Facility ID"

          },

          {

            "name": "INSPECTOR",

            "alias": "Inspection Person"

          },

          {

            "name": "INSSTATUS",

            "alias": "Inspection Status"

          },

          {

            "name": "ROTATION",

            "alias": "Rotation",

            "isnumber": true

          }

        ]

      },

      "links": {

        "link": []

      },

      "showattachments": null

    }

  ]

This is what I get in IE8

dojo/parser::parse() errorError: SyntaxError: Expected identifier, string or number in data-dojo-props='fields:[{name:"name",title:"Search Title",class:"search-title",type:"text",editable:false},{name:"actions",title:"Actions",class:"actions",type:"actions",actions:["up","down","edit","delete"]}]' 

and 

 Error: dijit._WidgetsInTemplateMixin: parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin. Must pre-load all supporting widgets before instantiation.

Nathan Kerr,

   That error is related to you not using the Non Beta version of my eSearch widget with the 1.x release of the WAB Developer version. Please go get the latest eSearch widget.

That did the trick.  Sorry to bother you but thanks for the help.

Nathan Enge,

   The map service that you are attempting to use is not returning ANY geometry... It looks like you have the shape field hidden in that map service layer.

Robert

I totally missed that! Thanks, all is good now.

Nathan Enge,

   Glad I could help. Be sure to click on the Helpful Yes link on posts that are helpful to you.

Robert

Do you know if the openatstart property works with a tab theme.  My widget will not open at start in the sidebar so the url search does not work until I open the widet.  Do you see anything wrong with this?

{"name":"eSearch","label":"Find","version":"1.1.0.1","uri":"widgets/eSearch/Widget","config":"configs/eSearch/config_Find.json","index":5,"id":"widgets/eSearch/Widget_30","openAtStart":true}

Mark,

   Your json looks good. I have not done very much with the tab theme so I am not sure if openAtStart work for it or not (that may be why they do not have openAtStart configurable through the UI).

OK thanks Robert. I have also been parsing the url in the geocoder

widget. I can get the url value into the widget, but I need it to run at

startup. I thought that find would do what I want, but does not. Would

you have any ideas for this?

_initGeocoder: function() {

this._getGeocoders(this.appConfig.portalUrl).then(lang.hitch(this,

function() {

var json = this.config.geocoder;

json.map = this.map;

//added mwy for url parsing in

geocoder

var urlObject =

esri.urlToObject(document.location.href);

if (urlObject.query)

{

if

(urlObject.query.search)

{ prop =

urlObject.query.search; }

//alert(prop);

json.value = prop;

var geocoder = new

Geocoder(json);

this.own(on(geocoder, 'select', lang.hitch(this, "findComplete")));

this.own(on(geocoder, "auto-complete", lang.hitch(this,

"onFindResults")));

this.own(on(geocoder, "find-results", lang.hitch(this,

"onFindResults")));

html.place(geocoder.domNode, this.domNode);

geocoder.startup();

geocoder.focus();

geocoder.find();

geocoder.on("find-results", function(evt) {

if(evt.results.results.length == 0){

alert("No Matching

Locations");

}

});

} else {

var geocoder = new

Geocoder(json);

this.own(on(geocoder, 'select', lang.hitch(this, "findComplete")));

this.own(on(geocoder, "auto-complete", lang.hitch(this,

"onFindResults")));

this.own(on(geocoder, "find-results", lang.hitch(this,

"onFindResults")));

html.place(geocoder.domNode, this.domNode);

geocoder.startup();

}

}), lang.hitch(this, function(err) {

console.error(err);

}));

},

Mark Yerington, GISP

MAGIC GIS Systems Analyst

3205 CEDAR ST | MUSCATINE, IA 52761

PH: 563.262.3316 | CELL: 563.260.4525

Never mind. Just found this to get the job done.

all().then(function(results){

geocoder.select(results[0].results[0]);

});

Mark Yerington, GISP

MAGIC GIS Systems Analyst

3205 CEDAR ST | MUSCATINE, IA 52761

PH: 563.262.3316 | CELL: 563.260.4525

Mark,

  Glad you got it figured out.

Thanks again Robert. I really like the esearch widget. This will have to

be my work around or backup until I can get the esearch to open at start.

I really like the tab theme so I am going to try and stick with this.

Mark Yerington, GISP

MAGIC GIS Systems Analyst

3205 CEDAR ST | MUSCATINE, IA 52761

PH: 563.262.3316 | CELL: 563.260.4525

Mark,

do I understand you are using the geocoder to find features rather than addresses?

I didn't realize this was possible.

how do you build a locator to do this?

You have to build your own custom locator service. I have a composite

locator that will search through addresses and parcels. So I can parse

the url with an address or parcel pin. We are also probably going to

build in the ability to search for water and electric meters so our

Customer service reps can view the maps and zoom to an address that they

are viewing in their software that they use. They have the ability to use

a url as a link and this is why the parsing of the url is so crucial to

our Municipal utility. You can locate any geographic feature that you

have a unique field for it does not have to be an address. You just have

to specify that in the single field address locator key field.

Composite Locator

http://resources.arcgis.com/en/help/main/10.1/index.html#//00250000003r000000

Mark Yerington, GISP

MAGIC GIS Systems Analyst

3205 CEDAR ST | MUSCATINE, IA 52761

PH: 563.262.3316 | CELL: 563.260.4525

You can build a composite locator using the py toolbox found at this blog entry. It's what I used to enable a local government client to replace their world geocoder with their own.

It now searches by address point, assessment ID, permit application number, etc...

The sample uses water utility but you just need the py toolbox it comes with.

http://blogs.esri.com/esri/arcgis/2014/07/18/enabling-the-power-of-search-on-geospatial-data-within-a-water-utility/

Nathan ENGE

Professional Services

Esri Canada

thanks

it is nice be part of a community where people are willing to help others.

I will give the toolbox a try.

Hello Robert,

I want to first say that your widgets are awesome! I am trying to implement the eSearch widget within Portal for ArcGIS 10.3's WAB. I was able to get the widget in the WAB easily but when I go to change the settings, it just spins. I thought it may be because my site only allows SSL so i changed the config.json to look at layers that are on my Arc Server. Do you have any ideas what I might be doing wrong. I have exhausted all my other resources before I bothered you.

Thanks,

J

Jeremiah,

  1. First question is are you sure that you are using the latest eSearch version?
  2. Have you tried to bring up your browsers developer tools and see what the console says?

also

remember that it has to be the developer version of the WAB to use Robert's widget.

I am using the 1.1.0.1 version and when looking at the errors in Firebug (which is all I have right now) it shows two 404 errors:

Get LayerFieldChooser.js 404 Not Found

Get SymbolPicker.js 404 Not Found

\stemapp\jimu.js\dijit\ does not have these two files in there.

Thanks for your help.

Good point. I was hoping to find a was to use it in the WAB in the Portal so that others in my group that can not program, could benefit from the widget. If this is the issue, is there a workaround to make the widgets i create available in Portal's WAB?

Thanks.

just download the developer version and use it. it will still work with portal as your site where you keep the webmaps.

Jeremiah,

   Well this really sinks... If sounds like the AGOL and the Developer version is different from the 10.3 portal version then. I am not sure where to go from here...

Yep... I just double checked. They are different. However... it's not a pretty solution, but i copied all the *.js files from the Developer version \stemapp\jimu.js\dijit\ to the corresponding folder on my server and now its working.

Hopefully ESRI will fix this.

Thanks again for troubleshooting this with me Robert and Glenn!

sorry to be a bit slow and I don't have portal installed yet.

but

are you saying that you have to replace the code in the default portal WAB to get the developer version of the WAB to work with portal?

using AGOL I just have the developer version in my wwwroot directory and when I start the WAB developer version it just asks where my webmaps are living.

I was assuming this could be either portal or agol.

can you detail a bit of what the configuration issue is.

Glenn,

I guess let me explain what I am doing first. I have WAB Developer on my workstation and it runs just fine. It is configured with my Portal for AcGIS on a server within our internal network. I am creating both apps in WAB and just my own in javascript and HTML. There are a few others in my group that want to create their own app but have very limited programming skills. They are using WAB that is installed on the server within ArcGIS for Portal. I wanted my widgets to be available to them. ESRI documentation states that all you have to do is copy the widget folder of custom widgets to the widget folder on the server (C:\Program Files\ArcGIS\Portal\apps\webappbuilder\stemapp\widgets), however none of my widgets would work.

It turns out that there are  files, particularly *.js files in \stemapp\jimu.js\dijit of the WAB Developer that are not in C:\Program Files\ArcGIS\Portal\apps\webappbuilder\stemapp\jimu.js\dijit on the server.

To be clear, we want to deploy App's in the portal that have our configurable/customized widgets.

Hope this helps.

I should also mention that in order to get customized widgets to work in WAB within Portal, you will have to mirror the "webappviewer" folder to the "webappbuilder" folder. So basically any changes need to be made twice.

hi

I just tried to run the locator toolbox using the data that downloads with the model.

everything seems right but when I run the model it fails to build the locators.

the output is below. can you help me understand what is wrong please.

Executing (Single Field Asset Locator): AssetLocator "E:\A4W-WaterAssetLocator-v1\Maps and GDBs\WaterNetworkAssets.gdb\WaterDistribution\wHydrant" FACILITYID "Hydrant ID" E:\A4W-WaterAssetLocator-v1\Locators\Hydrant

Start Time: Fri Jan 09 10:07:09 2015

Running script AssetLocator...

Failed script AssetLocator...

Traceback (most recent call last):

  File "E:\A4W-WaterAssetLocator-v1\Maps and GDBs\Single Field Asset Locator.tbx#AssetLocator.py", line 92, in <module>

  File "E:\A4W-WaterAssetLocator-v1\Maps and GDBs\Single Field Asset Locator.tbx#AssetLocator.py", line 66, in main

RuntimeError: Object: Error in adding error message


Failed to execute (Single Field Asset Locator).

Failed at Fri Jan 09 10:07:09 2015 (Elapsed Time: 0.06 seconds)

Glenn,

   Please start a new thread on this as it has nothing to do with my eSearch widget. You can mention Nathan Enge using the @ symbol and then typing his name, to see if he is willing to continue to help you on that new thread.

Good Day Robert,

I'm having what I believe to be possibly proxy issues... with the ESW. I am running the latest WAB 1.0 that was just released.  I've download installed and configured with out issue the ESW 1.1.0.1. (it sees my service, populates attributes, and updates SQL statements correctly with non-alias fields). When I run the tool and perform a By Shape, or Attribute query I immediately get the Search Failed window. When I track the request through chrome. It appears to go to my server and service, but fails to return anything, it looks like it is an invalid http request possible.  Here is the message from Chrome.

------------ From a search by shape--------------

Error: Unable to complete operation. {code: 400, message: "Unable to complete operation.", details: Array[0], log: undefined, httpCode: 400…}

Widget.js:1044 Error: Unable to complete operation. {code: 400, message: "Unable to complete operation.", details: Array[0], log: undefined, httpCode: 400…}

------------------------------------------------------------

This is the message from Fiddler on the same button click

---------------------- Response From Fiddler4-------------------

---------------------

The Service I am accessing is public and draws in the web app, and the attributes show up in the ESRI attribute table.

-Any ideas where to check?

Thanks!

norm

Norm,

   I just used your Tax Parcel Service in the ESW on my WAB Dev version and I was able to search by attribute and shape. So, is it a deployed app that is having the issue or it in the WAB Dev Version?

Robert - Both act the same… I was thinking that maybe the WAB might have problems and a download app would not but they act the same…

I was also thinking the WAB app was developed with a https connection (somehow ESRI had me connected that way from the beginning, caused problems retrieving the initial service from my webserver, the app wanted to get it from an https server, have since figured this out and log in using http) to the development machine (local, not on the Inet), I have since logged in with just http and created a new application on the WAB and encountered the same problem, but haven’t downloaded it to the Server Serving the Services I am accessing… and is where the app will be deployed..

So I am developing local, accessing services from my webserver and AGOL, then downloading that app and loading it to my webserver then publishing. (good workflow?) It seems it should connect at the WAB level…

Norm,

   That is the exact workflow I use. Can you share your config_Enhanced Search.json for review?

If you would like to keep this private then you can start a new discussion > click the little pencil next to your avatar > Choose Create Discussion > below where you type your discussion text is where you can define where the discussion is placed > choose specific people > enter or find my name. Doing this will keep the discussion and it contents private.

I have two questions for you.

1) Is it possible to get dropdown lists sorted alphabetically?

2) Is it possible to format the results list and popup window?

For example, I have configured a search on a city layer and specified "CITYNAME (string) is Unique" as the expression.  When I run the eSearch tool, the list of city names appears to be in a random order, even though when I look at the HTTP request that is made to populate the list it is clearly being returned sorted alphabetically.  outFields=CITYNAME&orderByFields=CITYNAME

(EDIT: Random order is not the right way to describe it.  It is more like it is almost in alphabetical order but with occasion random mistakes, like a city that begins with "A" is inserted in between "L" and "M" city names.   And upon reloading the site and creating the list again, it may be a different city name that is out of order.   It is not consistently the same one in the same wrong position in the list.)

When I run the search for the city of "Kent", the results panel shows:

Kent

: undefined

The popup window for the result is then different from the popup widow for that actual map layer.  Ideally we could somehow specify for the results tool to use the popup configuration from the webmap.  I know the search tool is not using the webmap at all, but it would be nice to have a consistent display of popup windows for the actual map layer and the search results on that map layer. Even if I could just manually configure the result popup window, that would suffice.

Thanks!

Michael

Hey Folks,

Has anyone experienced a problem with formatting a field to contain a $ and the other formatting for numeric types? This is what the field looks like in the service side.

ParAsmt_Final.NetTaxAmount ( type: esriFieldTypeDouble , alias: NetTaxAmount )

I can not check the currency Field Check Box at all, and can not maintain the check marks in the  precision or Thousands separator check boxes.

Should I be using a different type of Field?

Thanks in Advance!

Michael,

  I will look into the list sorting issue.

Why your results window shows

Kent

: undefined

I don't know, I would have to see your json.

Formatting the results list is not something I am currently considering making configurable.

The search widgets popup was never intended to be the same as popups for layers in the map. The eSearch widget allows you to search data that does not exist at all in the Web Map.

Can you be more specific about what you would want to format in the popup and results?

Norm,

  Looks like you have found a bug. I will look into it.

Robert, I was hoping it was just something I was doing. Tks!

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