Select to view content in your preferred language

Hide field tool?

2127
10
12-08-2017 08:41 PM
BrianE
by
Frequent Contributor

I know there is a Delete Field in the Fields toolset? Is there one to Hide Fields?

0 Kudos
10 Replies
DanPatterson_Retired
MVP Emeritus

Brian  The easiest way is to right-click on a field and...

Then you could do it another way in the 'Fields View'

Then you can toggle on or off depending on the state that they are currently in

0 Kudos
BrianE
by
Frequent Contributor

Thanks Dan. I am aware of these methods but I wanted to incorporate the Hide Fields into a task. My goals is to have  users in my group run a task and it automatically hides approx 33 out of 36 fields.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Fields toolset... none

Tables toolset... none

if you are referring to these toolsets otherwise I am not sure what you are referring to

JoshuaBixby
MVP Esteemed Contributor

To follow up on Dan's comment, this has been a common question and complaint on GeoNet recently, i.e., how do I modify field visibility using ArcPy.  From a practical perspective, one could argue, "you don't."  Esri has not and continues to not in Pro support modifying field visibility directly on layers and table views.  The best one can do is using Describe on a layer or table view to get the fields, modify the field properties (which doesn't modify the existing layer or table view in TOC), and then use the new field properties to create a new layer that replaces the old layer.  It is a kludgy work around that is prone to issues, but it appears the best we have until Esri decides to expand ArcPy functionality.

0 Kudos
BrianE
by
Frequent Contributor

Wow. Crazy that there is a "Delete Field" tool but no "Hide Field" tool? This makes no sense to me. Will post in ArcGIS Pro Ideas. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

close the thread then with disappointment although it would be easy to create your own script using ListFields and the setvisible property... which is probably why they didn't create a tool, since deleting a field is a permanent state while visibility is a property and not persisted when the featureclass is read in another project.

0 Kudos
by Anonymous User
Not applicable

What about using the "Table View" tool?

0 Kudos
BrianE
by
Frequent Contributor

Thanks Mike. Unfortunately, that just creates an extra table but the fields in the feature class are still visible. 

0 Kudos
by Anonymous User
Not applicable

That's true...I was just sifting through a couple hundred emails from the forums and was shooting from the hip on that. I think Dan could be onto something though.

0 Kudos