Skip to content

Being able to filter on whether a field is empty or null #6138

@OtherSystems

Description

@OtherSystems

NetBox version

v2.10.8

Feature type

Change to existing functionality

Proposed functionality

Similar to #4522

Would like to be filter on fields (such as dns_name) to empty or not empty, so get a list of where dns_name is not set or just has anything

Perhaps this could be done with the filter dns_name__null or dns_name__empty and for the reverse dns_name__notempty or dns_name__notnull

For us the syntax wouldn't matter, as long as the functionality is possible.

Use case

we have scripts that operate on dns_name currently we check this with dns_name_ic=. to see if there any to use but that's a bit ugly and not 100% correct.

Checking for empty fields would also be useful for scripts where you want to inform users/admins of incomplete entries, like where someone has forgotten to set the platform or location of a device.

Database changes

No response

External dependencies

No response

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions