Can a hosted feature layer view exclude related tables

5474
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

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.

0 Kudos
Trippetoe
Occasional Contributor III

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?

0 Kudos
KhaledHassen
Esri Contributor
0 Kudos
Trippetoe
Occasional Contributor III

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.

by Anonymous User
Not applicable

Has anyone heard any updates on this?

Thanks,

Gee

0 Kudos
Trippetoe
Occasional Contributor III

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.

 

  1. 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

    }

  ]}

 

  1. 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

by Anonymous User
Not applicable

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

0 Kudos
KhaledHassen
Esri Contributor

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).

by Anonymous User
Not applicable

Thanks KHassen-esristaff

This feature would be so helpful for our team.

Thanks again,

Gee

0 Kudos
by Anonymous User
Not applicable

Hi Khaled Hassen

Is this still on track for the June online release?

Thanks,

Gee

0 Kudos