Custom field filtering #10040

Closed
opened 2025-12-29 21:26:05 +01:00 by adam · 6 comments
Owner

Originally created by @M0NsTeRRR on GitHub (Aug 1, 2024).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v4.0.8

Feature type

Change to existing functionality

Proposed functionality

Add a way to filter custom field data when creating/editing related objects, similar to the "database" button on IPAM > IP Addresses (Interface Assignment).

Use case

I'm adding a custom field DCIM > Interfaces on Circuits > Provider Network object to track ENNI interfaces. We have multiple GigabitEthernet0/0/0 interfaces on different devices and we can't filter the interface based on the device name, which leads to confusion about which interface is chosen, as we can't know which one we selected.

Example with the interface creation menu:
image

Current functionality (no database button for filtering):
image

Database changes

No response

External dependencies

No response

Originally created by @M0NsTeRRR on GitHub (Aug 1, 2024). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v4.0.8 ### Feature type Change to existing functionality ### Proposed functionality Add a way to filter custom field data when creating/editing related objects, similar to the "database" button on `IPAM > IP Addresses` (Interface Assignment). ### Use case I'm adding a custom field `DCIM > Interfaces` on `Circuits > Provider Network` object to track ENNI interfaces. We have multiple `GigabitEthernet0/0/0` interfaces on different devices and we can't filter the interface based on the device name, which leads to confusion about which interface is chosen, as we can't know which one we selected. Example with the interface creation menu: ![image](https://github.com/user-attachments/assets/042fbacd-ccec-4744-8441-a73121d3f41c) Current functionality (no database button for filtering): ![image](https://github.com/user-attachments/assets/59a1d971-6340-495a-8db5-2c3f1a0d330b) ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurepending closurestatus: revisions needed labels 2025-12-29 21:26:05 +01:00
adam closed this issue 2025-12-29 21:26:05 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 6, 2024):

Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our contributing guide, a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.

@jeremystretch commented on GitHub (Aug 6, 2024): Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md), a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.
Author
Owner

@M0NsTeRRR commented on GitHub (Aug 6, 2024):

I've updated the feature request; I hope it aligns better now.

PS: I've read the contribution guide before creating this PR and used the feature request template. If something is still missing, please point out what is unclear.

@M0NsTeRRR commented on GitHub (Aug 6, 2024): I've updated the feature request; I hope it aligns better now. PS: I've read the contribution guide before creating this PR and used the feature request template. If something is still missing, please point out what is unclear.
Author
Owner

@jeremystretch commented on GitHub (Aug 6, 2024):

@M0NsTeRRR the entirety of your proposed functionality is a single sentence:

Add a way to filter custom field data when creating/editing related objects, similar to the "database" button on IPAM > IP Addresses (Interface Assignment).

Please spend some time and effort considering how this might be implemented and elaborate on the specific functionality you want to propose. What is the intended workflow? What specific UI changes are needed? Give some examples.

If you're not prepared to offer this degree of detail, please open a discussion instead.

@jeremystretch commented on GitHub (Aug 6, 2024): @M0NsTeRRR the entirety of your proposed functionality is a single sentence: > Add a way to filter custom field data when creating/editing related objects, similar to the "database" button on IPAM > IP Addresses (Interface Assignment). Please spend some time and effort considering _how_ this might be implemented and elaborate on the specific functionality you want to propose. What is the intended workflow? What specific UI changes are needed? Give some examples. If you're not prepared to offer this degree of detail, please open a [discussion](https://github.com/netbox-community/netbox/discussions/new?category=ideas) instead.
Author
Owner

@lchabert commented on GitHub (Aug 6, 2024):

Hi @jeremystretch,

I'm joining @M0NsTeRRR for this feature request. It will be usefull if filters on custom-fields to be more precise. Especially when we have a lot of data inside objects likes interfaces (same name multiples times).

Exemple: we setup an custom-field as type object, linked to an interface.

Then when we need to select one interface on new object instance, we have 10k interfaces, with at least 1000 interfaces named 'Gi0/0/0/1' (one per each device).

I have made some test on my local netbox instance, and it seems we have only one line to add
https://github.com/netbox-community/netbox/blob/develop/netbox/extras/models/customfields.py#L503
=> +selector=True

Before:
image

After:
image

Is it more clear for you ?
Thx, Regards

@lchabert commented on GitHub (Aug 6, 2024): Hi @jeremystretch, I'm joining @M0NsTeRRR for this feature request. It will be usefull if filters on custom-fields to be more precise. Especially when we have a lot of data inside objects likes interfaces (same name multiples times). Exemple: we setup an custom-field as type object, linked to an interface. Then when we need to select one interface on new object instance, we have 10k interfaces, with at least 1000 interfaces named 'Gi0/0/0/1' (one per each device). I have made some test on my local netbox instance, and it seems we have only one line to add https://github.com/netbox-community/netbox/blob/develop/netbox/extras/models/customfields.py#L503 => +`selector=True` Before: ![image](https://github.com/user-attachments/assets/559b9905-3e33-4439-b7cc-ba0cebc6bc91) After: ![image](https://github.com/user-attachments/assets/d497c936-cba4-4c92-90ea-de5f702f8008) Is it more clear for you ? Thx, Regards
Author
Owner

@github-actions[bot] commented on GitHub (Aug 14, 2024):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Aug 14, 2024): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 13, 2024):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Sep 13, 2024): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10040