The Table View
The Table View is the gateway to your data. It shows records as rows and their fields as columns.
Last updated
The Table View is the gateway to your data. It shows records as rows and their fields as columns.
Last updated
To search in Forest, use the search bar at the top of the page (1):
Your search terms are highlighted within the matching results (2).
Only regular fields are searched on. All reference fields of belongsTo
records are ignored, unless you are using an extended search.
Lets search for "Lowe":
We get no result!
The extended search lets you search also within reference fields of belongsTo
records.
Extended search is not the default search because it is slower.
Advanced search syntax is only supported on nodejs agents @forestadmin/agent
starting from version 1.36.18.
Search supports advanced syntax to help you find exactly what you are looking for:
-term
will search for records that do not contain term
;
property:term
will search for records that contain term
in the property
field ;
relation.childProperty:term
will search for records that contain term
in the childProperty
field of the relation
relation ;
term1 OR term2
will search for records that contain term1
or term2
;
term1 AND term2
will search for records that contain term1
and term2
(equivalent to term1 term2
);
term1 AND (term2 OR term3)
will search for records that contain term1
and either term2
or term3
.
property:NULL
will explicitly search for records that contain the technical value NULL
in the property
field ;
"multiple quoted words"
will search for records that contain the phrase multiple quoted words
without splitting it into multiple terms ;
All elements of the advanced syntax can be combined, for instance (property:term OR -term2) AND (property1:NULL OR relation.childProperty:term3)
.
Please note that NULL
, OR
and AND
need to be written in capital letters to be interpreted as operators.
The following syntax allows to search a specific term only on a given property in a database:
property:searchedTerm
will search the term "searchedTerm" in the field named property
;
relation.childProperty:searchedTerm
will search the term "searchedTerm" in the field childProperty
inside the relation named relation
.
The property name needs to match the technical one in the database. Forest Admin will ignore casing and separator characters such as -
and _
when searching for fields. For instance property_name
will match an technical property named propertyName
.
Focused search can be combined with other syntax, such as property:>20
to search for a value greater than 20.
Searching on text fields is done differently, depending on the different operators supported by your database. We select the right operator in this order of priority:
Contains (case insensitive)
Contains (case sensitive)
Equal
It means that, in a database that supports the first operator, searching the term Term
will return all records containing the text term
even if the case does not match. For instance:
TERM
will match
abcTERMdef
will also match
Number fields support the following additional syntax:
>42
will search for records that contain a number greater than 42
;
>=42
will search for records that contain a number greater than or equal to 42
;
<42
will search for records that contain a number lower than 42
;
<=42
will search for records that contain a number lower than or equal to 42
.
This syntax can be used in combination with property names, for instance property:>42
will search for records that contain a number greater than 42
in the property
field.
Date fields support the following additional syntax:
2020
will search for records that contain a date in the year 2020
;
2020-01
will search for records that contain a date in January 2020
;
2020-01-01
will search for records that contain a date on January 1st 2020
;
Operators >
, >=
, <
, <=
can be used in combination with dates, for instance
property:>2020-01-01
will search for records that contain a date after January 1st 2020
in the property
field ;
property:<=2020
will search for records that contain a date in 2020
or before in the property
field.
Dates will be considered expressed in the timezone configured in Forest Admin.
Boolean values support the following additional syntax:
true
or 1
will search for records that contain true
;
false
or 0
will search for records that contain false
;
True and false values are case insensitive, meaning that True
and False
will also work for instance.
Searching is just one way to be faster at finding the desired data. Forest Admin also allows you to use filters to sort your data.
By clicking on a column’s header (1), you will sort the data by descending then ascending order, depending on the type of data in this field. An arrow (2) will appear in the header, showing you that this column is sorted.
You can filter your list of records by clicking at the very end of the search bar on ‘Filter’ (1). Or you can also click on the filter icon in column headers as a shortcut to pre-fill the property you wish to filter on (2).
If you notice there is no filter (3): either you have disabled filtering on this field, or it is a Smart Field that does not support filters.
Once opened, the filter management dropdown will look like this:
The list of filtering options available depends on the nature of the selected field.
To change the logic between conditions, simply click to toggle between AND and OR.
Click Apply filters for them to be taken into account.
Once applied, you can save filters as segments (learn more about segments).
Filtering on related data is available from version 7.3.0 (4.0.0 for Rails).
Most filters are quite straight-forward. Some, however, require a little more explanation:
There are many date filters which should let you filter exactly on the time period of your choice, but it can get a little confusing. We've added a tooltip which tells you what the directly within the dropdown:
Just hover a date filter to see how it would apply right now.
In NoSQL orms, there is a difference between:
and
Now imagine a third sample:
Then the following filter conditions will yield the following results:
Condition(s) | Result(s) |
---|---|
size is blank | A and B |
size is present | A and C |
size is present and size is blank | A |
The Table View does not only display your data. It also allows you to interact with it:
Forest Admin provides basic CRUD actions out of the box. Check out how you can duplicate and delete from the Table View, but also create and update from dedicated views.
On all Table Views, you'll notice a down caret (▾) next to the top-left header checkbox. Clicking on it lets you choose between selecting all records of the collection or selection only records from the current page:
Selecting all records has no consequence, however applying an action to all those records might. That's why we've added a warning when you select all records (1):
Having selected all records, you can deselect records from this page only: moving to any another page will deselect all records.
Otherwise, you can select records from current page only (2) which will select only visible records:
Navigating the Forest Admin interface is pretty straightforward, and it won’t come as a surprise that our pagination is equally straightforward.
Very large collections can’t be displayed on a single page. Where this is the case, you will be able to check the number of records in the collection at the bottom right side of the Table View (1). At the bottom in the middle, you will be able to browse through the different pages of the collection (2).