Offer official support for removing related tables from hosted feature layer views

482
0
08-12-2021 11:10 AM
Status: Open
erica_poisson
Occasional Contributor III

First, some background:

We have a hosted feature layer (hFL) which is used in a variety of different ways. In total, there are 6 Views of this hFL; some views are internal and editable, while the others are public and have view definitions applied to limit the data which is exposed. 

This hFL was built to include a related table; within the table we can record unauthorized trail use/conditions when staff are in the area. This information should not be exposed to the public. I had reached out to Esri Customer Care to determine if there was a way to remove a related table from a hFL view --- they replied that yes this was possible by going to the View's admin rest endpoint to use the "delete from definition" tool. I was told to add in the following snippet of JSON:

  • {
    "layers": [{
    "id": 1,
    "relationships": [{
    "id": 0
    }]
    }]
    }

Once done, the hFL view no longer showed the related table. Awesome! 

After the fact, I learned that once you do this, you can not edit the pop-up (they basically break) and if you make schema changes to the original hFL (e.g. add a field or alter domains) they do not reliably trickle down to the hFL view that has had the related table removed. In some cases, schema edits come through fine, in other cases, they do not. There is also no way to undo the removal of the related table. The only option is to delete your View and start from scratch. 

My idea is this:

In future releases of AGOL, it would be great to improve the View experience and make it fully support to hide or remove related tables from hFL Views. Right now the behavior is erratic and there is no way to undo this once completed (this was a huge problem for us since our public view is used in almost 100 maps). 

I think this would be useful to anyone who needs to share data publicly, but also limit access to internal-only information stored in related tables (e.g. inspections or something).