Zum Hauptinhalt gehen

Autocomplete - erroneous results

Kommentare

6 Kommentare

  • Nico Burgerhart
    What is the maximum number of records returned by the underlying service. What if you increase this?
    0
  • Permanently deleted user
    It's set at 1000 right now. It would make sense that this would be the problem.  How does the autocomplete get it's list of values?  Does it do 1 query to the AGS rest endpoint at startup and work with that set of values only? Or does it refresh with each keystroke into the search box? 
    0
  • Permanently deleted user
    My layer has over 31K records.  Unfortunately upping the record count is not feasible. I would love to hear any suggestions you might have.
    0
  • John Nerge
    Are you using 1=1 in the Autocomplete Where Clause? If so, that would be why you're getting a list of all values from your layer. Autocomplete gets its list of values based on what you sets its Where Clause to, so 1=1 will return all unique values from the field in your layer (which is what it looks like is happening in your image).

     

    If you want search results to show up based on what the user types, you would use a Where Clause like:

     

    YourFieldName LIKE '{0}%'

     

    {0} is the placeholder for user input, so in plain language the query would say return values that start with the characters the user types.
    0
  • Permanently deleted user
    You could also use a textbox for input with a query task rather than autocomplete - I find autocomplete takes too long to load values for a large amount of features.

     

    I have a workflow that takes the users input as a form textbox, then uses that input to search a query task using the below like clause. Of course, this results in all values that are similiar but you can tweak it

     

    "ID LIKE '%" + textboxinput + "%'"

     

     

     
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.