Feature Layer Views display all Source data in Open data Portal

1238
7
08-21-2018 03:15 AM
AdrianHughes3
Occasional Contributor

We have recently noticed that feature layers views do not function correctly in  an AGOL Open Data Portal.

We have a feature layer view which represent the data from a feature layer that we wish to expose to the public as open data. This workflow is extremely useful and efficient as it means we do not need to duplicate data.

However when you click on the feature layer view in the open data portal the entire dataset without the definition query of the view is displayed to the user. This is quite a dangerous bug.

Our open data portal is not public yet so I can't share a link.

Tags (1)
0 Kudos
7 Replies
PatrickHammons1
Esri Contributor

Hi Adrian, I just tested some feature layer views and they functioned as expected. Can you tell me how you're setting your view definition in ArcGIS Online? Is it similar to the workflow described here?

0 Kudos
AdrianHughes3
Occasional Contributor

Hi Patrick,

Yes I'm using that workflow,using the view definition on the visualization tab of the item. I'm going to do more testing with other views to see if the issue is not just related to this feature class.

AdrianHughes3
Occasional Contributor

It seems that views can work in the Open data portal if created in the right way. I've not tested this fully yet and I can't remember how I created the view that doesn't work but this could be the answer for now. Here is a response from ESRI UK who also looked into this for us

Method 1 to create a view layer results in the whole layer (not the view only) being exposed in the Open Data site

  • Method 1

Under the Item details of the parent layer, select ‘Create View Layer’
From the item details page of the view layer, select ‘Open in Map Viewer’
On the Contents Pane, click the filter icon to set up a filtered view of the layer. Click ‘Apply Filter’
From the layer in the Contents Pane, click the three dots for ‘More Options’ and click on ‘Save Layer’
 
When viewed on the Open Data site the entire dataset (not the filtered view) is visible.
 


Method 2 to create a view layer results in just the view layer (filtered dataset) being exposed in the Open Data Site.

  • Method 2

Under the Item Details of the parent layer, select ‘Create View Layer’
From the item details page of the view layer, select the ‘Visualisation’ tab
Click the filter icon to set up a filtered view of the layer. Click ‘Apply Filter’
Select ‘Save Layer’ at the top of the page
 
When viewed on the Open Data site, only the filtered view is displayed es expected.

0 Kudos
JeffreySchmidt3
New Contributor III

We are experiencing the same issue where layers that we create do not retain their filters when added to the Open Data group.  Patrick Hammons does the workflow you suggest work with data containing subtypes?  We are publishing out our base data to 10.5.1 ArcServer and a subtype of that is trailheads... Our Organization has the checkbox checked to only allow standard SQL queries... and the feature layer has a filter:    Feature Layer filter

When I view this layer in an AGO map, I see 144 points, yet the open data portal shows a lot more data... 19,000 records worth... Here is the result: Michigan DNR Trailheads 

Maybe the SQL is not standard?  Maybe there is something else at play?  

Thanks!

0 Kudos
PatrickHammons1
Esri Contributor

Hi Jeffrey, I'm not sure if your issue is related. Can you walk me through how you're filtering your service?

0 Kudos
MichaelRubley
New Contributor

This is a dataset published to arc server and registered in our AGO account. From the registered dataset, Feature Layers were created and filters were applied through the visualization tab to display the data. The Feature Layer was then publish to the open data portal. The problem is that in ArcGIS Online the filtered dataset is displaying the correct data, but in the open data portal all of the features are being displayed. The Open data portal does not seem to be honoring the filters placed on Feature Layers.

0 Kudos
PatrickHammons1
Esri Contributor

Thanks for the clarification, Michael. The only way to have separate items in your open data portal based on filters would be through hosted feature layer views, which are available in ArcGIS Online and version 10.6 of ArcGIS Enterprise. Barring those options, you would need to publish separate items to your ArcGIS Server instance based on your filter logic. Workflows outlined below:

The ArcGIS Online/Enterprise 10.6 route:

  1. Publish your ArcGIS Server services as hosted feature services in ArcGIS Online,
  2. Create Hosted Feature Layers Views based on your filters (ArcGIS Online docs here, Enterprise 10.6 docs here)
  3. Share to your open data group 

The ArcGIS Server/Enterprise route pre 10.6:

  1. Publish separate ArcGIS Server services based on your filters
  2. Register in ArcGIS Online
  3. Share to your open data group