Allow custom field objects to be limited #9689

Closed
opened 2025-12-29 21:20:54 +01:00 by adam · 7 comments
Owner

Originally created by @karolyczovek on GitHub (May 16, 2024).

Originally assigned to: @jeffgdotorg on GitHub.

NetBox version

v3.7.8

Feature type

Data model extension

Proposed functionality

Is it possible, to set custom fields to honor relations?

For example, I set a custom field related to the site as multi-object with prefixes, then let the custom field honor the global/site-assigned specific prefixes.

Use case

Multi-field custom field object I could select from prefixes already assigned to site.

Database changes

No response

External dependencies

No response

Originally created by @karolyczovek on GitHub (May 16, 2024). Originally assigned to: @jeffgdotorg on GitHub. ### NetBox version v3.7.8 ### Feature type Data model extension ### Proposed functionality Is it possible, to set custom fields to honor relations? For example, I set a custom field related to the site as multi-object with prefixes, then let the custom field honor the global/site-assigned specific prefixes. ### Use case Multi-field custom field object I could select from prefixes already assigned to site. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurepending closurestatus: revisions needed labels 2025-12-29 21:20:54 +01:00
adam closed this issue 2025-12-29 21:20:54 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (May 17, 2024):

Thanks for your interest in helping improve NetBox.

I think your proposal makes sense, but since you've opened it against 3.7.8, I wonder whether the same effect might be possible with no code changes by leveraging improvements to the select controls in NetBox 4.0.

In the screenshot below, you can see that the description of a prefix now shows up in the custom field select control, and that by using type-ahead filtering you can limit the values shown. Assuming your prefixes have descriptions, I think this workflow might meet your need. Please give it a try in a test environment or on the [public demo system[(https://demo.netbox.dev/) and indicate whether you agree.

image
@jeffgdotorg commented on GitHub (May 17, 2024): Thanks for your interest in helping improve NetBox. I think your proposal makes sense, but since you've opened it against 3.7.8, I wonder whether the same effect might be possible with no code changes by leveraging improvements to the select controls in NetBox 4.0. In the screenshot below, you can see that the description of a prefix now shows up in the custom field select control, and that by using type-ahead filtering you can limit the values shown. Assuming your prefixes have descriptions, I think this workflow might meet your need. Please give it a try in a test environment or on the [public demo system[(https://demo.netbox.dev/) and indicate whether you agree. <img width="784" alt="image" src="https://github.com/netbox-community/netbox/assets/1209268/bc380363-0dae-44cb-9f27-2db448fe225a">
Author
Owner

@karolyczovek commented on GitHub (May 17, 2024):

Will give it a try, does 4.0 API already work with Ansible?

@karolyczovek commented on GitHub (May 17, 2024): Will give it a try, does 4.0 API already work with Ansible?
Author
Owner

@karolyczovek commented on GitHub (May 17, 2024):

Just run the smoke tests - UI-wise it looks fine but still an extra effort from the enduser - however ansible interaction (lookups and modules) are broken from 4.0

@karolyczovek commented on GitHub (May 17, 2024): Just run the smoke tests - UI-wise it looks fine but still an extra effort from the enduser - however ansible interaction (lookups and modules) are broken from 4.0
Author
Owner

@jeffgdotorg commented on GitHub (May 17, 2024):

Top people are working on the remaining 4.0 compatibility issues in the Ansible collection. I understand that may be a barrier to you upgrading your instances, but let's please keep the comments in this issue on topic to avoid confusing future time travelers.

@jeffgdotorg commented on GitHub (May 17, 2024): Top people are working on the remaining 4.0 compatibility issues in the Ansible collection. I understand that may be a barrier to you upgrading your instances, but let's please keep the comments in this issue on topic to avoid confusing future time travelers.
Author
Owner

@karolyczovek commented on GitHub (May 23, 2024):

Same applies in general - imagine sites with same-like named equipments - for example 16 sites with 20 cameras at each named camera NN, so custom field "related objects" would be nice to honor site

@karolyczovek commented on GitHub (May 23, 2024): Same applies in general - imagine sites with same-like named equipments - for example 16 sites with 20 cameras at each named camera NN, so custom field "related objects" would be nice to honor site
Author
Owner

@github-actions[bot] commented on GitHub (May 31, 2024):

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 (May 31, 2024): 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 (Jun 8, 2024):

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 (Jun 8, 2024): 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#9689