Filtering
By default the plugin will download all entries, and that's probably what 99% of the people using this plugin want. The normal export function of Gravity Forms on the other hand has a filter GUI, so this plugin should at least do the same. But because the plugin revolves around a URL, it works a bit different. Let me show you.
Retrieve one entry
You can add ?entry=<id>
to download a single entry for that form.
Filtering by date range
When you want to limit the results by date, you can use the GUI in the settings page. This is the only part that I've duplicated for filtering (so far). So you just select two dates, and press download. You can also add this filtering to the url, by adding querystring parameters.
Just add ?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
to the url, and the entries will be filtered between those dates.
Filtering by field value
- All field filters are added to the url within the
?filter=
querystring parameter. - A filter is made up of 3 parts.
<field>:<operator>:<value>
. However,operator
andvalue
are optional. - When no
operator
and novalue
are provided, we just check if the field is not empty. - When no
operator
is provided, we assume=
. So<field>:<value>
equals:<field>:=:<value>
. - More fields are added by adding a semi-colon
;
and adding another filter.
Some examples:
?filter=1
makes sure field 1 is not empty.?filter=1:pancake
makes sure field 1 equalspancake
.?filter=1:contains:cake
make sure field 1 contains at least the value ofcake
.?filter=1:pancake;2:honey
make sure field 1 equalspancake
and field 2 equalshoney
.
Multipart fields
Some fields, like Name and Address, have multiple input fields. These are not easily read from the GUI. I usually dig
into the source code to figure them out. if you do know them you can target them by adding a dot .
between the field
id, and the sub input. Something like ?filter=2.2:contains:street
should work perfectly.
Operators
The operators you can use are: <
, >
, =
, >=
, <=
, <>
, contains
, is
, is not
, in
and not in
.
For in
and not in
you can provide multiple comma-separated values. Like ?filter=1:in:bread,pancake
.
Also note that url's should have escaped values. a &
will not work because this will break the filter
querystring.
Disclaimer
The plugin uses the internal API for filtering that Gravity Forms provides. If you feel like you are not getting the correct results, you should try the normal export function and see the results. It's most likely the same. Therefore any issues regarding this filtering should be made aware to Gravity Forms.