OpenFn / adaptors

The new home for OpenFn adaptors; re-usable connectors for the most common DPGs and DPI building blocks.
GNU General Public License v3.0
4 stars 8 forks source link

ODK: make it easy to filter submissions by date #657

Open josephjclark opened 3 days ago

josephjclark commented 3 days ago

In ODK, when fetching submissions, it's often useful to get by date - particularly when running a cron job.

Users need to build a query like:

$filter=$root/Submissions/__system/submissionDate gt 2020-01-31T23:59:59.999Z 

Which is a lot of typing for a common use case!

A couple of thoughts:

This would certainly be a lovely API:

getSubmissions(66, form2, { since: $.cursor })

Where cursor is set on input state or the last cron job.

The solution would like require the common cursor so probably needs an example or two somewhere (overview, readme or jsdoc)