Adding Assignment to Custom Field #10406

Closed
opened 2025-12-29 21:31:02 +01:00 by adam · 1 comment
Owner

Originally created by @remchuk on GitHub (Oct 25, 2024).

NetBox version

v3.5.6

Feature type

New functionality

Triage priority

N/A

Proposed functionality

Adding assignment to custom field.
It doesn't have to be a required field but it could help a lot of people.

I want to have the option to link 2 custom field.
Meaning I would like to have 2 custom fields, which one is assigned to other,
it will act as "is_primary" in the IPAM --> IP Addresses. and "Primary IPv4" in DCIM --> Devices.

Currently there is no real option to do this, and developing a plugin for this fills like a huge overkill.
Is there a reason for not having this?

Use case

Currently I have to model each of those "custom fields" by it self.

I have for example a custom field called vpc_pair, I think it is a waste of time and quite uncomfortable to add it on each device, rather then if I would have added it to one of them, the other would also be changed.

Database changes

No response

External dependencies

No response

Originally created by @remchuk on GitHub (Oct 25, 2024). ### NetBox version v3.5.6 ### Feature type New functionality ### Triage priority N/A ### Proposed functionality Adding assignment to custom field. It doesn't have to be a required field but it could help a lot of people. I want to have the option to link 2 custom field. Meaning I would like to have 2 custom fields, which one is assigned to other, it will act as "is_primary" in the IPAM --> IP Addresses. and "Primary IPv4" in DCIM --> Devices. Currently there is no real option to do this, and developing a plugin for this fills like a huge overkill. Is there a reason for not having this? ### Use case Currently I have to model each of those "custom fields" by it self. I have for example a custom field called `vpc_pair`, I think it is a waste of time and quite uncomfortable to add it on each device, rather then if I would have added it to one of them, the other would also be changed. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurenetbox labels 2025-12-29 21:31:02 +01:00
adam closed this issue 2025-12-29 21:31:03 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 6, 2025):

I have for example a custom field called vpc_pair, I think it is a waste of time and quite uncomfortable to add it on each device, rather then if I would have added it to one of them, the other would also be changed.

Custom fields are intended to store unique values per object. It sounds like you're trying to use them to represent a single related object, which is not supported. (You might consider writing a plugin to support your use case.)

@jeremystretch commented on GitHub (Feb 6, 2025): > I have for example a custom field called vpc_pair, I think it is a waste of time and quite uncomfortable to add it on each device, rather then if I would have added it to one of them, the other would also be changed. Custom fields are intended to store unique values _per object_. It sounds like you're trying to use them to represent a single _related_ object, which is not supported. (You might consider writing a plugin to support your use case.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10406