mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-13 14:11:37 +00:00
List filters (#10203)
* Add support for 'list' filtering * Docs * Add unit tests
This commit is contained in:
@@ -100,6 +100,20 @@ If you enter an invalid option for the filter field, an error message will be di
|
||||
!!! warning "Advanced Users"
|
||||
Report filtering is an advanced topic, and requires a little bit of knowledge of the underlying data structure!
|
||||
|
||||
#### List Filtering
|
||||
|
||||
To filter a queryset against a list of ID values, you can use the following "list" syntax:
|
||||
|
||||
```
|
||||
item__in=[1,2,3]
|
||||
```
|
||||
|
||||
Note that:
|
||||
|
||||
- The list must be enclosed in square brackets `[]`
|
||||
- The items in the list must be comma-separated
|
||||
- The key must end with `__in` to indicate that it is a list filter (*note the double underscore*).
|
||||
|
||||
### Metadata
|
||||
|
||||
A JSON field made available to any [plugins](../plugins/index.md) - but not used by internal code.
|
||||
|
Reference in New Issue
Block a user