Select to view content in your preferred language

WAB eSearch and uniquevalsfromfield

1057
5
Jump to solution
02-27-2017 12:52 PM
WilliamBailey
Emerging Contributor

Working with Javascript WAB eSearch widget and uniquevalsfromfield.

It does work, albeit kind of slowly (took a minute to process 172k records)

My users are definitely going to bark about this. (field is unusable until all records are processed)

Is there another way to reference a lookup table with only unique values to populate this drop down?

Or another way I have not thought of, I desperately need to speed this up.

Code:

{

"fieldObj": {

"name": "SUBDIVISION_NAME",

"label": "Subdivision",

"shortType": "string",

"type": "esriFieldTypeString"

},

"valueObj": {

"value": "%"

},

"prompt": "Subdivision",

"textsearchhint": "",

"sqltext": "SUBDIVISION_NAME LIKE '[value]%'",

"operation": "stringOperatorStartsWith",

"uniquevalsfromfield": "SUBDIVISION_NAME",

"operator": "AND"

},

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

William,

  If the field SUBDIVISION_NAME has a coded domain applied to it then eSearch will automatically populate a dropdown with the coded values.

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

William,

172k records is a bit to go through to get unique values for. Since I can see you are wanting a drop down of your sub division name then you should just use the predefined list option in the eSearch instead of unique that has to run a query on every 1k of records until it gets all 172k and then loop through to get the unique ones to add to the list. Using the predefined you manually have to add the subs one time and the widget will create a drop down from those values.

0 Kudos
WilliamBailey
Emerging Contributor

The only limitation with userlist/predefined is that the list changes when new subs are added and there are 3,800 unique sub names, the manual list will get quite awkward. 

Please explain and/or point to sample where a domain is used in eSearch if possible. (I do have a domain that is re-built every night)

thank you for your time

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

William,

  If the field SUBDIVISION_NAME has a coded domain applied to it then eSearch will automatically populate a dropdown with the coded values.

WilliamBailey
Emerging Contributor

The domain is working as expected, thank you.

Can this drop-down now become multi-select ??

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

William,


  There is no orb dojo multi select dijit. So the short answer is no.

0 Kudos