Web map has features filtered OUT but these features are still showing in queries in web app (public notification app)

1863
11
Jump to solution
10-11-2018 04:15 PM
ChrisZemp
New Contributor II

Hi there,

I am building a public notification system app following the ESRI documentation and have configured it for use with our data.

When using the public notification app, we do NOT want properties in the public right-of-way to be selected and exported.

I have set up filters in the web map, which the web app is pointing at, to ensure this is the case.

I have verified my queries are correct, but for some reason, when selecting parcels using the public notification app selection tool (e.g. radius within X ft), those parcels in the public right-of-way are still selected in the query and thus exported.

The strange thing is, when in the app, those features in the public right-of-way are no longer clickable (e.g. no pop-up displays, because they are being filtered out within the web map), yet they are selected for export still.

I even tried setting up a filter widget within the web app to no avail.

Is there a solution without resorting to imposing a definition query at the feature service level of our parcels layer?

Thanks.

1 Solution

Accepted Solutions
MikeMinami
Esri Notable Contributor

I just checked with the team responsible for the widget. It is on their list of things to address, however, no time frame has been applied to it. If you're working with hosted feature layers, consider creating a view layer to filter out features from the layer.

thanks,

Mike

View solution in original post

11 Replies
MikeMinami
Esri Notable Contributor

I'm not familiar with the public notification app, or how it works. As you say, it's ignoring the filter, which leads me to believe that when the app is selecting features within a given radius is accessing the service endpoint directly and bypassing the filter.

A filter defined in the web map is stored in the web map, or alternatively can be stored on the layer item if you save the layer from the web map. As long as client apps are accessing through the layer item, they should apply the filter. It is the responsibility of the client app to respect the filter. However, the actual data source of the layer still contains the filtered data and it is accessible. 

Here's something you might try and maybe it will work. Instead of applying the filter in the web map, create a view layer of your original layer and set a view definition instead. This actually enforces the filter at the data source level, as if the data isn't there.

To create a view layer, go to your layer item. There's a button to 'Create View Layer'

Create hosted feature layer views—ArcGIS Online Help | ArcGIS 

On the new layer, go to the Visualize tab and in the left panel toolbar click the More Options button (3 dots). You can set a view definition here, which restricts features at the service endpoint.

Set hosted feature layer view definition—ArcGIS Online Help | ArcGIS 

Perhaps if you use this layer, it will work as you expect.

Mike

ChrisZemp
New Contributor II

Thanks Mike,

Finally got around to messing with this. Had never heard of 'views' until you brought it up. The only problem with using a hosted feature layer service within ArcGIS Online is that it's not tied to our REST service, so when we update our parcels layer, the hosted parcels layer in ArcGIS Online wouldn't auto-update.

Appreciate your detailed response though. 

Chris

0 Kudos
MichaelVolz
Esteemed Contributor

Mike:

Can you create a View layer if the feature service is stored on an org's ArcGIS Server but is referenced in AGOL?

0 Kudos
MikeMinami
Esri Notable Contributor

You can only create view layers from hosted feature layers, not ArcGIS Server layers. However, if you can publish to your server, you can effectively publish your own second layer to support what you need.

Mike

0 Kudos
KyleWikstrom
Occasional Contributor II

I want to follow up on this to ask if there has been any discussion or progress regarding the Public Notification widget not respecting the filter setup on the layers in the web map. We have just recently experienced this issue where we too are desiring to not include ROWs, WATER, and certain other features in the Public Notification output, however, the widget still selects them. We would like to not have to create a separate map service or view specifically for this application.

Thanks much!

0 Kudos
MikeMinami
Esri Notable Contributor

I just checked with the team responsible for the widget. It is on their list of things to address, however, no time frame has been applied to it. If you're working with hosted feature layers, consider creating a view layer to filter out features from the layer.

thanks,

Mike

MichaelVolz
Esteemed Contributor

Hopefully this item is fixed in the near term as the following thread shows the difficulties in using hosted feature layer views:

https://community.esri.com/thread/231430-cannot-overwrite-hfs-with-views 

0 Kudos
by Anonymous User
Not applicable

I'm seconding anyone who wants the filters to not be ignored.

LindaKuhn
New Contributor II

Any update on a time line for the public notification app to not ignore the filter?

0 Kudos