Query --> predefined unique value

845
6
03-20-2019 03:03 AM
JohnLocke1
New Contributor III

Hi all!

I have a question about query widget. I have 1100 towns in my drawing, with streets, house numbers, etc. I would like to make a query to town, and house number. I created a set, and add the town and house number field UNIQUE value as well. But there are lots of numbers, so i cannot wait for collecting the town list. It's not friendly.

I deciced to use predefined unique values for towns, and I config it well, it's working. But unfortunately, when use predefined unique values, it will be a static list, and you have to search the town in the list, you cannot start typeing. Is there any solution, to make this predefined list to dynamic? Or something else?

Thanks

John

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

John,

   Unfortunately deep in the WAB code they are using a custom dijit that they developed for the predefined list and there is no ability to have it act like a filteringselect dijit where you can start typing a value. Your only option is to call tech support and start a enhancement request. 

0 Kudos
JohnLocke1
New Contributor III

Thanks Robert your reply.

I was thinking about it, and can it be the solution, if I set the query field as VALUE, where user should type the the town, but it's not autocomplete. Is it possible to write a js file, which uses a list that contains the name of the towns, and somehow I adopt it to the query widget, to autocomplete the values.

Can it be possible? (only interested in)

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

John,

  Absolutely that is possible but if you are going to go that far then you might as well just add a new PredefinedValueProvider2.js to the dijit\_filter folder that uses a FilteringSelect dijit from dijit/form and then add the new PredefinedValueProvider2.js to the option in the ValueProviderFactory.js

JohnLocke1
New Contributor III

Thanks, I will try it.

0 Kudos
JohnLocke1
New Contributor III

Is this solution requires that the ArcGIS API should be hosted on webserver? Now it's not.

Should I use a dojo/store for the values?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

John,

   No there is no need at all to self host the API. I personally use dojo/store/Memory for the values

0 Kudos