Custom field - multiple selections #3057

Closed
opened 2025-12-29 18:25:12 +01:00 by adam · 4 comments
Owner

Originally created by @LinzerToertchen on GitHub (Dec 10, 2019).

Note: This issue is a possible duplicate of #2522.

Environment

  • Python version: 3.7.5
  • NetBox version: 2.6.7

Proposed Functionality

I want to be able to select multiple values in custom fields of type "Selection" like I can with eg. Tags.

Screenshot from 2019-12-10 13-06-58

Use Case

I use NetBox as the source of truth for deploying Virtual Machines. I want to give my users the ability to pre-install software on virtual machines. For this I want them to be able to select multiple values from a custom field of type "Selection".

Database Changes

I honestly have no Idea.

External Dependencies

None

Originally created by @LinzerToertchen on GitHub (Dec 10, 2019). <!-- NOTE: 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. --> Note: This issue is a possible duplicate of #2522. ### Environment * Python version: 3.7.5 * NetBox version: 2.6.7 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality I want to be able to select multiple values in custom fields of type "Selection" like I can with eg. Tags. ![Screenshot from 2019-12-10 13-06-58](https://user-images.githubusercontent.com/9468979/70532131-b2419000-1b56-11ea-8a36-cf7f77bd21a1.png) <!-- 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 I use NetBox as the source of truth for deploying Virtual Machines. I want to give my users the ability to pre-install software on virtual machines. For this I want them to be able to select multiple values from a custom field of type "Selection". <!-- 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 I honestly have no Idea. <!-- 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 None
adam closed this issue 2025-12-29 18:25:12 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 10, 2019):

Unfortunately many-to-many relationships are not supported by the data model used to store custom field values, and changing it would require disproportionate development effort.

I want to give my users the ability to pre-install software on virtual machines.

Tags might be better suited for this task.

@jeremystretch commented on GitHub (Dec 10, 2019): Unfortunately many-to-many relationships are not supported by the data model used to store custom field values, and changing it would require disproportionate development effort. > I want to give my users the ability to pre-install software on virtual machines. Tags might be better suited for this task.
Author
Owner

@jdorel commented on GitHub (Feb 11, 2020):

I would like to add another use case for this feature: assigning ansible groups to devices/vms.

@jdorel commented on GitHub (Feb 11, 2020): I would like to add another use case for this feature: assigning ansible groups to devices/vms.
Author
Owner

@jeremystretch commented on GitHub (Feb 12, 2020):

@jdorel Tags work very well for that.

@jeremystretch commented on GitHub (Feb 12, 2020): @jdorel Tags work very well for that.
Author
Owner

@jdorel commented on GitHub (Feb 12, 2020):

I currently use tags for this, but it makes it harder to coexist with other systems, because of possible namespace collisions. For example I would like that some ansible variables be in Netbox.

For now I have to prefix every tag for group assignation with ansible_group:, and every ansible variable with ansible_variable:. Having a custom field for that would be perfect.

Although I could use a text field with values separated by spaces, I wouldn't work for variables holding strings.

Maybe the solution would be just adding a list type in the custom fields ?

@jdorel commented on GitHub (Feb 12, 2020): I currently use tags for this, but it makes it harder to coexist with other systems, because of possible namespace collisions. For example I would like that some ansible variables be in Netbox. For now I have to prefix every tag for group assignation with `ansible_group:`, and every ansible variable with `ansible_variable:`. Having a custom field for that would be perfect. Although I could use a text field with values separated by spaces, I wouldn't work for variables holding strings. Maybe the solution would be just adding a `list` type in the custom fields ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3057