Add VID as an object #11849

Closed
opened 2025-12-29 21:50:39 +01:00 by adam · 5 comments
Owner

Originally created by @WINthenriksn on GitHub (Nov 19, 2025).

NetBox version

v4.4.2

Feature type

Change to existing functionality

Proposed functionality (Edited)

I would like to be able to select which attribute is returned when matching an object with custom fields. Currently when I match on a VLAN object the name attribute is returned with the VID in parentheses behind it. I would love to have the option to return only the VID without including the name.

Use case

I have a handful of custom fields that I use to match on multiple VLANs. We have a number of circuits that utilize multiple VLANs and in order to track those I have created a custom field utilizing the "Object" type in order to link existing VLANs to the circuit. Our VLAN naming structure is longer than the simple VLAN ID and for ease of display and reporting purposes it would be ideal to display only the VID for some of these purposes.

Another use potential use case: In circuit terminations I can select a Site for one of my termination points, this returns the Site name. I would love to be able to also return the site address without having to drill down into the linked object.

Database changes

I do not believe that any database schema changes would be necessary for this, but admittedly I do not have strong database skills.

External dependencies

No response

Originally created by @WINthenriksn on GitHub (Nov 19, 2025). ### NetBox version v4.4.2 ### Feature type Change to existing functionality ### Proposed functionality (Edited) I would like to be able to select which attribute is returned when matching an object with custom fields. Currently when I match on a VLAN object the name attribute is returned with the VID in parentheses behind it. I would love to have the option to return only the VID without including the name. ### Use case I have a handful of custom fields that I use to match on multiple VLANs. We have a number of circuits that utilize multiple VLANs and in order to track those I have created a custom field utilizing the "Object" type in order to link existing VLANs to the circuit. Our VLAN naming structure is longer than the simple VLAN ID and for ease of display and reporting purposes it would be ideal to display only the VID for some of these purposes. Another use potential use case: In circuit terminations I can select a Site for one of my termination points, this returns the Site name. I would love to be able to also return the site address without having to drill down into the linked object. ### Database changes I do not believe that any database schema changes would be necessary for this, but admittedly I do not have strong database skills. ### External dependencies _No response_
adam added the type: featurepending closurestatus: revisions needednetbox labels 2025-12-29 21:50:39 +01:00
adam closed this issue 2025-12-29 21:50:40 +01:00
Author
Owner

@kyerlasswell commented on GitHub (Nov 20, 2025):

I don't think this would work very well on anything beyond a flat network. If you only saw the VID in the object selection menu, you would not be able to differentiate between two VLANs with the same VID. For example if I have VID 100 at 200 different sites, what you are proposing, if I understand you correctly, would show me a list of 200 identical values and I wouldn't know which one is the right one.

@kyerlasswell commented on GitHub (Nov 20, 2025): I don't think this would work very well on anything beyond a flat network. If you only saw the VID in the object selection menu, you would not be able to differentiate between two VLANs with the same VID. For example if I have VID 100 at 200 different sites, what you are proposing, if I understand you correctly, would show me a list of 200 identical values and I wouldn't know which one is the right one.
Author
Owner

@jeremystretch commented on GitHub (Nov 20, 2025):

There is only one VLAN object in NetBox: name and vid are attributes of this object.

@WINthenriksn please rewrite your proposal above because it's not clear what you're proposing.

@jeremystretch commented on GitHub (Nov 20, 2025): There is only one VLAN object in NetBox: `name` and `vid` are attributes of this object. @WINthenriksn please rewrite your proposal above because it's not clear what you're proposing.
Author
Owner

@WINthenriksn commented on GitHub (Nov 20, 2025):

@jeremystretch I am likely using incorrect terminology as I am still fairly new to Netbox. I suppose what I would be asking for would be for the option to select which attribute is returned when using objects.

If I have a VLAN object VID: 100 Name: Site A VOIP Network, I am wanting to be able to select that VLAN object but display only the VID and not the name.

My use case being that I am interested in being able to quickly identify what VLANs are tagged to a specific circuit. Displaying the whole VLAN name makes the view quite cluttered.

After taking your comment into consideration I think a more appropriate title would be something along the lines of "Permit Selecting Different Attributes When Matching Objects" that feels a little convoluted so any advice would be welcomed.

@kyerlasswell I definitely understand what you are saying, this is why I don't want a simple text list of VLAN IDs, For this specific reference I just only want to view the VID attribute since I am working with multiple VLANs and just wanting a simple VLAN ID list for reporting and sanity checks. Being able to display just the VID while still being linked to the VLAN object would allow me to click the VID and get the rest of the VLAN attribute information and identify which routing instance I am working in.

@WINthenriksn commented on GitHub (Nov 20, 2025): @jeremystretch I am likely using incorrect terminology as I am still fairly new to Netbox. I suppose what I would be asking for would be for the option to select which attribute is returned when using objects. If I have a VLAN object VID: 100 Name: Site A VOIP Network, I am wanting to be able to select that VLAN object but display only the VID and not the name. My use case being that I am interested in being able to quickly identify what VLANs are tagged to a specific circuit. Displaying the whole VLAN name makes the view quite cluttered. After taking your comment into consideration I think a more appropriate title would be something along the lines of "Permit Selecting Different Attributes When Matching Objects" that feels a little convoluted so any advice would be welcomed. @kyerlasswell I definitely understand what you are saying, this is why I don't want a simple text list of VLAN IDs, For this specific reference I just only want to view the VID attribute since I am working with multiple VLANs and just wanting a simple VLAN ID list for reporting and sanity checks. Being able to display just the VID while still being linked to the VLAN object would allow me to click the VID and get the rest of the VLAN attribute information and identify which routing instance I am working in.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 28, 2025):

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 (Nov 28, 2025): 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 (Dec 5, 2025):

This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.

@github-actions[bot] commented on GitHub (Dec 5, 2025): This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11849