Custom Field filter on e.g. type #4005

Closed
opened 2025-12-29 18:32:34 +01:00 by adam · 6 comments
Owner

Originally created by @chas0rde on GitHub (Aug 21, 2020).

Environment

  • Python version: 2,7,17
  • NetBox version: 2.8.8

Proposed Functionality

Allow custom fields to be shown based on filters

Use Case

e.g. one could have a custom field "CPU type" which is applied to devices and only shown if the Device Type is e.g. Server
This could allow much more dynamic inventory of datacenter equipment and allow for further tasks like utilizing such information for determining license demand and such

Database Changes

Don't know

External Dependencies

Originally created by @chas0rde on GitHub (Aug 21, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 2,7,17 * NetBox version: 2.8.8 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Allow custom fields to be shown based on filters <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case e.g. one could have a custom field "CPU type" which is applied to devices and only shown if the Device Type is e.g. Server This could allow much more dynamic inventory of datacenter equipment and allow for further tasks like utilizing such information for determining license demand and such <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes Don't know <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies
adam added the type: feature label 2025-12-29 18:32:34 +01:00
adam closed this issue 2025-12-29 18:32:34 +01:00
Author
Owner

@kobayashi commented on GitHub (Aug 24, 2020):

Is this same as Filtering by Custom Field?

@kobayashi commented on GitHub (Aug 24, 2020): Is this same as [Filtering by Custom Field](https://netbox.readthedocs.io/en/stable/rest-api/filtering/#filtering-by-custom-field)?
Author
Owner

@DanSheps commented on GitHub (Aug 24, 2020):

Are you proposing a API change? A UI change? Does the functionality outlined by @kobayashi suit you?

@DanSheps commented on GitHub (Aug 24, 2020): Are you proposing a API change? A UI change? Does the functionality outlined by @kobayashi suit you?
Author
Owner

@chas0rde commented on GitHub (Aug 25, 2020):

Hello
No its not the same. I am talking about an UI change I guess.
The idea is based on how Icinga Director handles custom fields. Basically there it is possible to hide a field on the UI if certain criteria are not met. See https://icinga.com/docs/director/latest/doc/16-Fields-example-SNMP/
Custom fields in netbox are currently always shown. If you handle several device types in netbox with lots of information it might get hard to use due to lots of not-needed fields.
E.g would a field „CPU type“ be nice for servers but is not required for other racked devices
This way the input can be much more dynamic allowing efficient inventory of Datacenter devices

@chas0rde commented on GitHub (Aug 25, 2020): Hello No its not the same. I am talking about an UI change I guess. The idea is based on how Icinga Director handles custom fields. Basically there it is possible to hide a field on the UI if certain criteria are not met. See [https://icinga.com/docs/director/latest/doc/16-Fields-example-SNMP/](https://icinga.com/docs/director/latest/doc/16-Fields-example-SNMP/) Custom fields in netbox are currently always shown. If you handle several device types in netbox with lots of information it might get hard to use due to lots of not-needed fields. E.g would a field „CPU type“ be nice for servers but is not required for other racked devices This way the input can be much more dynamic allowing efficient inventory of Datacenter devices
Author
Owner

@jeremystretch commented on GitHub (Aug 27, 2020):

This sounds well beyond the intended scope for custom fields. The need to toggle visibility of a custom field based on other criteria suggests that the data doesn't belong in NetBox to begin with.

@jeremystretch commented on GitHub (Aug 27, 2020): This sounds well beyond the intended scope for custom fields. The need to toggle visibility of a custom field based on other criteria suggests that the data doesn't belong in NetBox to begin with.
Author
Owner

@chas0rde commented on GitHub (Aug 30, 2020):

Hello
What specifically is the intended scope?
I always understood netbox as a dcim sort of. Thus I would like to have all relevant information about my Datacenter and idf equipment documented there

Best regards

@chas0rde commented on GitHub (Aug 30, 2020): Hello What specifically is the intended scope? I always understood netbox as a dcim sort of. Thus I would like to have all relevant information about my Datacenter and idf equipment documented there Best regards
Author
Owner

@jeremystretch commented on GitHub (Aug 31, 2020):

What specifically is the intended scope?

The proposed enhancement:

Allow custom fields to be shown based on filters

I always understood netbox as a dcim sort of.

And it is. However it can fulfill that function without the proposed enhancement.

@jeremystretch commented on GitHub (Aug 31, 2020): > What specifically is the intended scope? The proposed enhancement: > Allow custom fields to be shown based on filters > I always understood netbox as a dcim sort of. And it is. However it can fulfill that function without the proposed enhancement.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4005