Hi Robert,
I am not sure if this may be a bug in the widget but when I try and access the unique values for a data layer that has many unique values present (i.e. over 100), in the 'Add Expression' dialogue the window just seems to spin on the 'Retrieving unique values' (see attached print screen). Have you encountered any other problems with this or is the number of unique values present a problem? Thanks
Solved! Go to Solution.
Melissa,
It is actually a one line fix in the code. If you open your apps [install dir]\\server\apps\[app #]\widgets\eSearch\PaginingQueryTask.js file and find these lines:
if (this.version >= 10.1) {
this.query.orderByFields = [this.fieldName];
}
And change it to:
if (this.version > 10.11) {
this.query.orderByFields = [this.fieldName];
}
You will be in business
Melissa,
Could you post again with the developer tools on the console tab (instead of the network tab)?
Ok just reposted with a different screen shot:)
OK,
that helps. Can you attach your config_Enhanced Search.json file?
Ok done..but for some reason, when I access the config.json under the server apps (i.e. C:\WAB\arcgis-web-appbuilder-1.2\arcgis-web-appbuilder-1.2\server\apps\2\widgets\eSearch), the config file seems to show only the layers that were downloaded with the esearch zip file...it doesn't seem to be updated with my data layers?
Melissa,
That is because that file is not the one that is updated and used by the widget you will find the one that I need is located here: C:\WAB\arcgis-web-appbuilder-1.2\arcgis-web-appbuilder-1.2\server\apps\2\configs\eSearch\config_Enhanced Search.json
Melissa,
Have updated my help documentation to help people understand that using "definitionexpression": "1=1", is not necessary and will cause issues. Remove 1=1 from the definition expression field in the widgets UI for all your layers.
Web AppBuilder for ArcGIS | Help - Enhanced Search widget | Definition Expression
Melissa,
This is the query that is being sent to your service and it is failing.
So I did some testing using a small integer field with one of my map services and it work fine with almost identical query parameters.
I am concerned about the use of "Unique" as a field name in your data (as that would seem to be a reserved keyword in many databases). I would suggest a test by renaming or recreating the field in your data with a underscore (i.e. _unique) or some other more meaningful name and re-testing.