Allow filtering of ObjectVar and MultiObjectVar input selections for custom fields #10532

Closed
opened 2025-12-29 21:32:46 +01:00 by adam · 2 comments
Owner

Originally created by @sounddudenz on GitHub (Dec 2, 2024).

Originally assigned to: @atownson on GitHub.

NetBox version

v4.1.2

Feature type

New functionality

Triage priority

I volunteer to perform this work (if approved)

Proposed functionality

This is very simular to #17944

Proposing to extend the functionality of the object selection inputs (ObjectVar and MultiObjectVar) in Custom Fields to be able to filter the selection in the same fashion that's available in the create/edit forms.

image

Suggest adding the optional parameters selector (boolean with a default of False).

Use case

I wanted to add a custom field to "Provider Network" to assign a Network to a Interface. Adding the custom field Interface worked well, but just shows all the interfaces which is unusable. A selection filter would make this much easier to use so we could filter on a device and then choose the interface.

Database changes

None

External dependencies

None

Originally created by @sounddudenz on GitHub (Dec 2, 2024). Originally assigned to: @atownson on GitHub. ### NetBox version v4.1.2 ### Feature type New functionality ### Triage priority I volunteer to perform this work (if approved) ### Proposed functionality This is very simular to [#17944](https://github.com/netbox-community/netbox/issues/17944) Proposing to extend the functionality of the object selection inputs (ObjectVar and MultiObjectVar) in Custom Fields to be able to filter the selection in the same fashion that's available in the create/edit forms. ![image](https://github.com/user-attachments/assets/e979a18b-47b6-43ee-8a35-f6863477cab9) Suggest adding the optional parameters selector (boolean with a default of False). ### Use case I wanted to add a custom field to "Provider Network" to assign a Network to a Interface. Adding the custom field Interface worked well, but just shows all the interfaces which is unusable. A selection filter would make this much easier to use so we could filter on a device and then choose the interface. ### Database changes None ### External dependencies None
adam added the status: acceptedtype: featurecomplexity: medium labels 2025-12-29 21:32:47 +01:00
adam closed this issue 2025-12-29 21:32:47 +01:00
Author
Owner

@atownson commented on GitHub (Feb 24, 2025):

Question for the maintainers regarding this: Would it be acceptable to always render the object selection button on Object and MultiObject inputs?

@atownson commented on GitHub (Feb 24, 2025): Question for the maintainers regarding this: Would it be acceptable to always render the object selection button on Object and MultiObject inputs?
Author
Owner

@atownson commented on GitHub (Mar 6, 2025):

I can work on this.

@atownson commented on GitHub (Mar 6, 2025): I can work on this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10532