Set filters directly in QField
L
Laura Borg
It would be nice if you could set filters directly in QField. At the moment, we have always set filters when creating the project, but you can't change them afterwards, except on the PC.
It would also be enough if you could show and hide filters.
For the sake of clarity, we have filtered our data so that only the current date is shown. If we could change or turn off this filter, we could see the data from previous days without losing track because there is too much data in the project at the same time.
Ni Co
Hi,
The only way I've found to reproduce a filter display similar to QGIS is via symbology.
as shown in this link
https://ideas.qfield.org/app-feature-requests/p/entity-filtering
For temporal data, there's the option of using symbology coupled with themes.
Ni Co
For exemple,
In my project i have
-a point layer: FieldData with a list values attributes (whose can be: green,red,blue)
-a Date attribute in dd/MM/yyyy format.
In filter in the rules-based symbology, write:
"FieldData" = 'green' AND "DATE" =format_date( now(),'dd') || '/' || format_date( now(),'MM') || '/' || format_date( now(),'yyyy')
And save this as "Today data" theme
In filter in the rules-based symbology,write:
"FieldData" = 'green' AND substr( "DATE",4,2)=format_date(now(),'MM')
And save this as "Monthly data" theme
And to show all data, in filter in the rules-based symbology, just write:
"FieldData" = 'green'
And save this as "All data" theme
You just need to adapt this to your project