Is there a way to hide fields of a table in a hosted feature view?

3200
6
Jump to solution
03-11-2019 01:02 PM
JosephDrahos
New Contributor II

I have a hosted feature layer that I am creating a view off of with the intent of making the view publicly available but hiding certain system fields. The hosted feature layer consists of 3 layers and 4 tables. After creating the view, I am able to go into Visualization in order to set the view definition for the 3 layers, to include hiding certain fields. However, the tables do not appear in the drop-down list of layers that I can make these adjustments to.

Is there a way that I can hide specific fields within those 4 tables in the view?

There are some creator username fields that I wish to hide for the publicly available view but I'm not able to do this.

0 Kudos
1 Solution

Accepted Solutions
KellyGerrow
Esri Frequent Contributor

If you open the table in Map Viewer, are you able to see the set view definition option on the table?

-Kelly

View solution in original post

6 Replies
KellyGerrow
Esri Frequent Contributor

If you open the table in Map Viewer, are you able to see the set view definition option on the table?

-Kelly

JosephDrahos
New Contributor II

Thanks Kelly! That did the trick. I was under the impression that the visualization section was the only place I can set the view definition. I think part of it might have been my own impatience though as I recall checking via the map viewer. At least in my attempts, it takes a second or two for the 'Set View Definition' option to appear. I think I was too click happy and briefly saw it wasn't there before moving on to check something else.

EmilyCaruccio
New Contributor III

Hi Kelly, I opened a table in Map View but do not see the Set View Definition like I do for hosted feature classes. Is this no longer an option?

0 Kudos
BrittanyBurson
Occasional Contributor III

Hi @KellyGerrow -- I was able to set the View Definition on my table, but the setting is not inherited once I use that table in a "Join Feature" hosted join. I also don't see any option for setting the view definition on the hosted join layer to mimic that of the table it is joining from. Do you have any suggestions?

Thank you!

KhaledHassen
Esri Contributor

You can always turn off visibility of any fields by using the layer updateDefinition API.

You can pass one or more fields in the API below.

Ex:

http://serverUrl/<myOrg>/ArcGIS/rest/admin/services/<serviceName>/FeatureServer/<layerId>/updateDefinition

Then you need to pass the following:

{

  "fields" : [

  {

     "name" : "myFieldName",

    "visible" : false

  }

]

Thanks

Khaled

JosephDrahos
New Contributor II

Khaled, this is a good recommendation and is an option I plan to keep in my back pocket for future use. I wish I could mark your answer 'correct' as well.

0 Kudos