• Resolved chriskryx

    (@chriskryx)


    Hello Doeke,

    I have extensively used your plugin and am very grateful for it! Thanks to this support forum you have also helped me solve many custom things in the past, indirectly, by answering to previous questions of other users. ??

    Right now, I am dealing with an issue and I have decided to post here after trying all I could to solve it myself, and checking whether anyone else had a similar issue.
    I have tried applying what I’ve seen in:
    https://www.ads-software.com/support/topic/filter-with-link-url-variables-using-array_filter/#post-10808605
    https://www.ads-software.com/support/topic/url-variables/#post-10684492
    But I still couldn’t manage to solve it ??

    I have a date field in my Gravity Form: “Activity Date”
    I am looking for a way to export the entries by using an URL query filter just like the built-in

    “?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD”

    This checks the “Created” date field, but I need to check my “Activity Date” field. Maybe something like:

    “?act_start_date=YYYY-MM-DD&act_end_date=YYYY-MM-DD”

    I have tried:
    “?2:>:YYYY-MM-DD;2:<:YYYY-MM-DD”,
    “?2:in:YYYY-MM-DD,YYYY-MM-DD,YYYY-MM-DD,…”
    (2 is the id of Activity Date field)
    Unfortunately none of them worked…

    Is something like this achievable?

    You have my regards for still supporting this plugin!
    Chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Doeke Norg

    (@doekenorg)

    Hi @chriskryx,

    Awesome to hear you still using and enjoying the plugin! And kuddo’s to you for trying so many options; and my goodness; you were so close!

    To filter on a field, you need to use the filter keyword in the url, and provide the filters there.

    For example:
    ?filter=2:>=:2022-03-01;2:<:2022-05-31

    This will add two filters on field 2:

    • Where field 2 is >= (greater or equal) to 2022-03-01
    • Where field 2 is < (smaller) then 2022-05-31

    Together, these will essentially do: Where field 2 between *date1* and *date2*

    Hope this helps you out.

    As an extra tip: There is a Pro version of GravityExport available which allows you to add an extra download-url for your entries on which you can apply certain default filters. There is a great UI for selecting the fields and values it should be filtered on. This might be something you’re interested in.

    Have a great day.

    Thread Starter chriskryx

    (@chriskryx)

    Haha darn it!

    Can’t believe it was actually that easy and I missed the filter keyword. I did not miss it in the past, when I applied other filters, but now I must’ve missed it…
    I thought it was just not possible out of the box to filter dates like so.

    I’m glad the solution was this simple and you didn’t have to waste any more time on my issue. Thank you very much for the quick reply!

    Best regards,
    Chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Date Range for a custom Date field’ is closed to new replies.