Can a hosted feature layer view exclude related tables

5248
29
Jump to solution
01-19-2018 01:28 PM
Trippetoe
Occasional Contributor III

Hello.

We have a private hosted feature layer that has 3 related tables.  We want to make some of the 'spatial' data available to the public, but we don't want any of the related data visible to the public.

Is there a way to create a hosted feature layer view that excludes the related tables?  I tried not including the join field in the list of fields for the view, but related tables and their data are still present in the view.

thank you

0 Kudos
29 Replies
KhaledHassen
Esri Contributor

Most likely, Will update you shortly. It is still in development.

KhaledHassen
Esri Contributor

We have made the initial install for this in the API. But it might not make it from the UX. So in the next release you will be able to use feature service layer updateDefinition API with {"hasAttachments" : false} to disable attachments on the view. You can later enable it on the view only if it attachments is enabled in the source.

by Anonymous User
Not applicable

Do you know when ArcGIS online will be updated next? Can't wait to incorporate this feature into our workflows.

And thanks for all your help

Gee

0 Kudos
KhaledHassen
Esri Contributor

We are planning online 6.2 release in the next couple of weeks in June.

by Anonymous User
Not applicable

Thanks again, working as expected.

Gee

0 Kudos
by Anonymous User
Not applicable

Has there been any updates on disabling related tables from a feature layer view?

0 Kudos
KhaledHassen
Esri Contributor

You should be able to do this now. Just drop the layer or related layer you do not want in the view. This should not affect the source feature service or layers.

0 Kudos
Trippetoe
Occasional Contributor III

Hi khaled hassan‌.

I tried the 'DeleteFromDefinition' approach as suggested by you, i.e. dropping the three related tables from the service definition.  Indeed the three related tables were dropped from the View.  However, there have been some very 'interesting' side effects from doing that.

1) When on the service's Item Details > Visualization tab of the View, i am unable to configure the pop-up because there are no fields listed in any of the inputs of the Configure Pop-up dialog:

2) When executing a query from the WAB Query widget, no results are returned - and there is some additional odd behavior - and by that i mean that the query is executed against the layer ids of the related tables that were dropped. I know that probably doesn't make sense the way i typed it.  Here's a screen shot from the Chrome browser tools showing what i mean.  The app sends off requests against FeatureServer layers 1, 2, and 3 --- none of those layers exist. 

The response for the queries is not unsurprising:   {"error":{"code":400,"message":"","details":["The requested layer (layerId: 1) was not found."]}}

I have verified that if i create the View they way you had me do it before - drop the relationship from the layer then drop the layer from service - that i can configure the popup and i can execute a query against the View as expected.

If it's time to move this to a new thread or submit an Tech Support request, please let me know.

Thank you.

0 Kudos
KhaledHassen
Esri Contributor

Yes pl. work with Tech support so they can provide me with a repro case and I will take a look and work toward fixing this issue. Until then pl. create view with only the layer you need to avoid having to delete the layers after creating the view.

0 Kudos
Trippetoe
Occasional Contributor III

I'll open up a tech support case and get back to you with the number.

Unfortunately the view is based on a hosted feature service that contains three related tables.  I am not certain of how to create the view in a way that does not automatically contain the related tables. If such a thing is possible, please let me know. 

Thank you.