Filter a Server Connect Query by Date Range Picker

I’m struggling to get a Server Connect query to filter by a date range. I have a range of filters, based on a drop down. When you select the Dates Between it triggers a Date Range Picker to filter the query. All other filters are working fine.

In my Server Connect I have

image

and the filters are:

On the page the input parameters for the Server Connect action are:

image

‘animate4.resourceactivedatefilter.value’ is the expression in both _start and _end

This post suggests there should be start and end formatter options…

…but I can’t see them so my end result is the full date range of 2020-03-16 00:00:00/2020-03-17 23:59:59 gets passed to both $_GET parameters and so the filter doesn’t work. I’m not sure if the start and end formatters should be in the page parameters or the server side variables?

I’m sure there’s something really simple I’m missing but I just can’t see it right now!

If you want to pass the start and end date to the server connect parameters you need to use:

animate4.resourceactivedatefilter.start

and

animate4.resourceactivedatefilter.end

as values, instead of animate4.resourceactivedatefilter.value

1 Like

Yep, really simple!

That’s great and works just fine now! Thank you!!

I see the dynamic data picker doesn’t provide these in the UI - it only returns the value, which contains start and end dates like "2020-04-12 00:00:00/2020-04-15 23:59:59". I will check if we can add the start and end values there as well in next update.

3 Likes