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
Solved! Go to Solution.
Sure pl. recreate the view and share it with me. I can take a look and maybe send you the json you need to use.
I have re-created the view; it contains the three related tables. Do you have an email address or some other way that i can contact you directly so i can give you access to the view?
As a quick update, after some additional investigation, Esri staff has confirmed that using the 'deleteFromDefinition' method does not successfully remove related tables from a hosted feature layer view. They are working on debugging the problem and hopefully a worked around until the bug is fixed.
Has anyone heard any updates on this?
Thanks,
Gee
This is the response i got from khassen10 from Esri. the process worked for me.
Hi Tom,
I have looked/debugged this issue. The following workaround works for me in my dev env.
For deleting a table, you will need to delete the relationship first, then delete the related table. Not sure if you have tried this.
- For instance to delete related table with Id = 2.
Use http://.../ArcGIS/rest/admin/services/exporttestingView/FeatureServer/2/deleteFromDefinition
Pass the following json to delete the relationship between table Id=2 and layer Id = 0
{
"relationships" : [
{
"id" : 1,
"name" : "Test_Table_2",
"relatedTableId" : 0,
"cardinality" : "esriRelCardinalityOneToMany",
"role" : "esriRelRoleDestination",
"keyField" : "CaseNumber",
"composite" : false
}
]}
- Use service deleteFromDefinition to delete table with Id=2
Use http://.../ArcGIS/rest/admin/services/exporttestingView/FeatureServer/deleteFromDefinition
Pass the following json to delete the table with Id=2
{
"layers" : [
{
"id" : 2
}
]}
Pl. try this out and let me know if you still see the issue.
Thanks
Thanks Tom Rippetoe and Khaled Hassen,
Do you know if there a is a workaround for deleting attachments from a feature layer view?
Thanks,
Gee
Currently the attachments can only be disabled from the source and that would propagate to all views.
So the short answer is not currently supported. But I will add this as a future enhancement (maybe June online release).