"Too many values to display" - cannot set up filter

665
3
12-21-2023 03:23 PM
CRose
by
New Contributor III

I have a hosted feature layer that consists of river lines from the National Hydrography Dataset for a certain area. There are 287,993 line features.

I want to create a View that narrows this down to just a couple of rivers of interest. 

When I set up the filter, I am not able to search some of the values. Some of them work and others don't; it just reports "Too many values to display"-- even though I have typed the exact code that I want to include.

 

It doesn't let me just enter something that I typed- it seems that I must select it from the drop-down list. 

 

0 Kudos
3 Replies
CRose
by
New Contributor III

Also, when I am updating the View, I have to go back to Step 1 (Choose Layers) Tab before the Step 2 tab gives me the "+ Update" button. 

0 Kudos
CRose
by
New Contributor III

I would really prefer to use a SQL Query instead of having to do one at a time. I have a river section defined by reachcode instead gnis_id, and there are 71 of those. Ridiculous to have to enter each as a separate filter. 

0 Kudos
MobiusSnake
MVP

A couple ideas:

  • You could add a new integer field named something like "view_display_01" and set the values for those 71 records to "1".  Set your view's filter to 'view_display_001 = 1'.  For subsequent views, you could use _02, _03, etc. suffices.  This doesn't scale that well though, I probably wouldn't do this for more than a dozen or so views.
  • If you're comfortable using the Administrative REST API, you can update your view definition there as a SQL query - these filters are stored as where clauses in the view definitions, under a property named "definitionQuery".  You could initially set your filter to something very basic when creating the view, e.g. 'OBJECTID = 1', then set it to the proper clause via the API.  I'm not sure what the maximum length of these clauses is but I suspect a SQL IN clause with 71 IDs should be fine.

In either case you'll want to create an attribute index due to the number of features involved.

0 Kudos