RG display items with 2 dates based on 1 or 2 other dates

Hi, in my data type Leave Application, the leave is stored with 2 date/time.


image
image

In the list page of Leave Application RG, I’d like to display list of people on leave in a certain month

The rule should be:
If either Start Time or End Time is in this month, this record shows.

I haven’t figured out how this can work.
Any idea?

Hi @linzlee1 , I made a small demo:
Preview Link
Editor Link

You should be able to get there by using date ranges. Define the start and end point of each vacation on your data type through a new field e.g. “period” as type date range. Then in your repeating group search you can see whether a “period” overlaps with the current range selected through your filters.

I used date/time pickers but you can set the dates any way you want.

Does that help?

1 Like

Hi, @jukoen do you mean date range?
And the overlap thing is also what I understood, just don’t know how to set up.
Any suggestions on the actual settings of the overlap, a.k.a. the expression?
Thanks.

Hey, yes I meant date ranges also here’s the Editor Link.

Here is the expression of the RG data source:

@jukoen
I have set up the period field as date range and set it to overlap with custom state start date & end date.

image

image

I have 2 records that span across 30/08-02/09

But the record is still unfound. (see the custom state start & end date checkup below RG)

Do you see anything wrong with my setting?
Thank you in advance.

ps. If the Leave start & end dates are within the same month, it works:

Ok thanks for the details, it would be great if you could quickly share your editor link (set to public) so I can assist you better. You can also PM me.

Hi, @jukoen
I created new entries and those ones work now, think it’s just a bug or something.
Thanks for the help!