eSearch Widget Error

1769
5
Jump to solution
05-08-2016 07:07 AM
TimHayes1
Occasional Contributor III

I am using Web AppBuilder 2.0.

I have downloaded Robert's latest eSearch Widget.

In the Search URL, when I use a layer hosted locally (not on AGOL), I get this error: "Search URL Field Required, Included Fields is Empty".

The Layer I am using functions good with pop-ups enabled, etc. But, just when I try and use it with the eSearch Widget I get the above message.

My ultimate goal is to create a Drop-Down List with, for example these values: 0 Turns, Inoperable, Turns-Diameter Concern. The user would click on the Widget and the Drop-Down List would appear, then the user would choose "0 Turns", and the features with 0 Turns would be highlighted on the map.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Tim,

Are you entering a url to the mapservice layer that ends with the specific sublayer of the map service? Can you provide a screenshot?

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Tim,

Are you entering a url to the mapservice layer that ends with the specific sublayer of the map service? Can you provide a screenshot?

TimHayes1
Occasional Contributor III

Yes! the Sublayer ID. That was what I forgot. I wracked my brain for about an hour after I posted and then remembered to go back into my Flex work from a few years back (take a peak at your eSearch Widget XML file there) and saw the error of my ways. Thanks again Robert for bailing me out!

0 Kudos
ChristopherBertrand
Occasional Contributor

I have very recently downloaded the eSearch widget and am trying to implement it into an web app.  Though my feature service is only 2 fields (OID and Allotment_Number), I too am getting the "Search URL Field Required, Included Fields is Empty" message.  

After reading the earlier posts I went back to look at the 3 sample layer such as "Louisville Zoning" and noticed the /2 at the end of the layer url.  I assume these refer to the order of the layer's fields.  Is there a simple way to find these?  All references I've found on sublayers seem to assume I knew what sublayers were.  The best I've found is Sublayer | ArcGIS API for JavaScript 4.12 .  Even there there's nothing like "A sublayer is..."

0 Kudos
MichaelVolz
Esteemed Contributor

Go to the REST endpoint of the mapservice, if it is available to you.  Click on the specific mapservice that you are working with and under the Layers you will see the index for each feature class in the mapservice.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Christopher,

I assume these refer to the order of the layer's fields

No /2 does not have to do with the field. it is the layer id.

A map service can have may layers inside it and the search has to perform against a specific layer in that map service thus the "Louisville Zoning" in the example search layers is layer 2 (layer numbers are a 0 index. meaning the first layer is 0).

0 Kudos