How to filter based on a date range

Jeremiah Watkins
Contributor
January 29, 2024

I have Confiforms table and one field is a "Date" type. I want to add a filter control to select a "week" and have only the entries with the Date that falls within that week. If that's not possible, it would also be satisfactory to select a day, such as the first day of the week, and then show any entries with a date that falls between that day and (e.g.) "day+7".

I tried adding a Form Filter Control with that field in it, but for some reason even if I select the exact date that matches the Date in the entries I want, those entries aren't listed (I'm assuming maybe the timestamp is off by a few hours or something?).

How would I accomplish this?

1 answer

0 votes
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 30, 2024

Hi @Jeremiah Watkins 

You cannot make the ConfiForms Filter Control to filter automatically by week when a data is selected, but you can set the data fields to render as date ranges (parameter in ConfiForms Filter macro) to allow you to pick the date range

 

Alex

Jeremiah Watkins
Contributor
January 31, 2024

I changed the field type in the field definition to Date Interval, edited one of the entries and selected the interval as 1/29 - 2/2. Then on the filter I selected the same interval and hit Filter but it shows 0 entries. For the filter I have a Form Filter Control and within that I have one Field macro linked to the desired date range field. Is there something else I should check?

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2024

I was suggesting to enable an option in the filter macro… to render date fields as date time intervals

Jeremiah Watkins
Contributor
February 1, 2024

Okay I reverted the date fields back to DateTime, I enabled that option on the filter control. The filter still returns nothing. Additionally, when when I try to enter a second (different) filter, it shows an error:

Could not find a ConfiForms view macro to apply the filter. Make sure you have ConfiForms ListView, CalendarView, PlainView, CleanView or TableView/CardView on the same page (showing the data from the same form); and for TableView/CardView/CleanView/PlainView you have enabled filter support.

This was also happening before changing the filter macro.

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 1, 2024

Have you set Filter ID parameter in Filter macro and in the view to link them together?

Jeremiah Watkins
Contributor
February 2, 2024

I hadn't before, but I've now mapped the FilterID of the TableView with the Filter control. Now when I filter I still see the table (it would disappear before), but it's the full table, not filtered and I'm still getting the same error for some reason.

I only have the one Field macro inside the Filter control, is that right? Or should there be something else in there?

And regarding:

for TableView/CardView/CleanView/PlainView you have enabled filter support

I've verified that the TableView control has the following setting enabled: "Enable support for ConfiForms Filter Control"

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2024

Hard to tell, please open a support ticket with us https://wiki.vertuna.com/display/VERTUNA/Support+Request+Form so we can take a look together

Simple demo from my side: http://recordit.co/LkgxPGrrjt

Not sure if that helps

Alex

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events