Field Visibility Types

The API documentation for update field, PUT /api/field/:id, lists the following options for param visibility_type: details-only , hidden , normal , retired , and sensitive.

The Metabase UI in the Admin > Data Model only allows three settings for visibility: Everywhere, Only in details view, and Do not include, which map to following database values:

Everywhere - normal
Only in details view - details-only
Do not include - sensitive

What is the difference between sensitive and hidden, and what is the situation where the hidden value would be set in the database instead of sensitive?

Thanks.

Hi @metabasedev01
Here's a more descriptive functionality of each:
https://github.com/metabase/metabase/blob/master/src/metabase/models/field.clj#L19-L25
You should not use "hidden" or "sensitive" if the data is really sensitive. It's more used for hiding technical fields (like something containing a password hash - which is not useful by itself).
If you want to really restrict access, then you should do it with database privileges (or with views), so Metabase does not have any access to such columns.

Thanks. When I pass the value 'hidden' to the api, the field that was set to 'hidden' appears in the default summary (tabular) view and in the details view. Is this the expected behavior?

@metabasedev01 I don't think hidden is actually used anymore. Pretty sure it's a legacy value of sensitive. There has been several changes throughout the years in this area.

Great. Thanks again.

Hi there! I'm trying to use "Only in detail view " option in Visibility for a field which I'm calling it in a dashboard. But that doesn't seem to work. What is the fix for this?

@sgayathri Sounds like you have a different question than this topic, so start a new topic and describe your question.