Custom Field relation with Netbox Inventory #5209

Closed
opened 2025-12-29 19:25:28 +01:00 by adam · 5 comments
Owner

Originally created by @apellini on GitHub (Aug 19, 2021).

NetBox version

v2.11.11

Feature type

Change to existing functionality

Proposed functionality

Add the possibility to create a custom field that use Database Inventory as selection list.

For example, on IPAM ==> Prefix I could create a custom field that have a selection menu. Value of this menu are taken from DCIM ==> Device Table.

Use case

Identify L3 Gateway of a particular network. Identify CPE or root switches.

Database changes

No response

External dependencies

No response

Originally created by @apellini on GitHub (Aug 19, 2021). ### NetBox version v2.11.11 ### Feature type Change to existing functionality ### Proposed functionality Add the possibility to create a custom field that use Database Inventory as selection list. For example, on IPAM ==> Prefix I could create a custom field that have a selection menu. Value of this menu are taken from DCIM ==> Device Table. ### Use case Identify L3 Gateway of a particular network. Identify CPE or root switches. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 19:25:28 +01:00
adam closed this issue 2025-12-29 19:25:28 +01:00
Author
Owner

@sdktr commented on GitHub (Aug 20, 2021):

What you're suggesting is called 'Relationships' in the Nautobot spinoff: https://blog.networktocode.com/post/nautobot-relationships-part-1

Are you requesting the same functionality within Netbox? So you can point models directly to each other that aren't coupled in the core data model?

@sdktr commented on GitHub (Aug 20, 2021): What you're suggesting is called 'Relationships' in the Nautobot spinoff: https://blog.networktocode.com/post/nautobot-relationships-part-1 Are you requesting the same functionality within Netbox? So you can point models directly to each other that aren't coupled in the core data model?
Author
Owner

@apellini commented on GitHub (Aug 20, 2021):

Yes. It’s the functionality that I search.

@apellini commented on GitHub (Aug 20, 2021): Yes. It’s the functionality that I search.
Author
Owner

@jeremystretch commented on GitHub (Aug 20, 2021):

There has been talk of adding a custom field type to reference other objects, however to date no one has submitted a formal feature request. You're welcome to do so, however this would need a new FR as it's obviously more broad than the specific use case cited above.

@jeremystretch commented on GitHub (Aug 20, 2021): There has been talk of adding a custom field type to reference other objects, however to date no one has submitted a formal feature request. You're welcome to do so, however this would need a new FR as it's obviously more broad than the specific use case cited above.
Author
Owner

@apellini commented on GitHub (Aug 20, 2021):

So I have to open a new issue as Feature request with this text:

Adding same feature present in Nautobot fork 'Relationships': https://blog.networktocode.com/post/nautobot-relationships-part-1

Right?

@apellini commented on GitHub (Aug 20, 2021): So I have to open a new issue as Feature request with this text: Adding same feature present in Nautobot fork 'Relationships': https://blog.networktocode.com/post/nautobot-relationships-part-1 Right?
Author
Owner

@jeremystretch commented on GitHub (Aug 20, 2021):

No, not at all. That would definitely get rejected. 😆

What you want is the ability to reference a different object in NetBox using a custom field, right? Your specific use case happens to focus on inventory items, but really it doesn't matter what kind of model we're looking at. So what you have here is fine; it just needs to be rewritten to be more generic.

I've opened #7006 for this. I like the idea, however we'll need to figure out the exact implementation before it can be assigned a release milestone.

@jeremystretch commented on GitHub (Aug 20, 2021): No, not at all. That would definitely get rejected. :laughing: What you want is the ability to reference a different object in NetBox using a custom field, right? Your specific use case happens to focus on inventory items, but really it doesn't matter what kind of model we're looking at. So what you have here is fine; it just needs to be rewritten to be more generic. I've opened #7006 for this. I like the idea, however we'll need to figure out the exact implementation before it can be assigned a release milestone.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5209