29
Views
3
Comments
[OutSystems Data Grid] Rolling dates
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

When a user filters a Date Column in the Data Grid, does anyone know how they can filter by a rolling date (ex: "today") where "today" changes every day or if they search a range of dates (ex: "today" - 10 days)?

2022-12-30 07-28-09
Navneet Garg

can you please share some sample (ui or more detail) to understand the requirement better.

for filtering date there is discussion you can check that

https://www.outsystems.com/forums/discussion/93861/outsystems-data-grid-filter-a-datetime-column-with-date-filter/

if you are looking to convert date to human readable format than you can use 

https://www.outsystems.com/forge/component-overview/21024/humanizerdemo-o11

https://www.outsystems.com/forge/component-overview/4314/humanizer-o11



UserImage.jpg
Steven Stein

More specifically, when I filter a Date column by a condition:

say, between Feb 24th (4 days ago) and (today) Feb 28th)

And then I save that filter; I want the filter to automatically update based on when "today" is:

So if Today is March 7th, the filter will automatically be updated to between March 3rth and March 7th.
So, in the greater-than field, I would put "4 days ago," and in the less-than field, i would put "Today" Allowing the dates on the filter to be dynamic based on when the user is accessing the page.

2025-07-22 10-30-27
Mandar Deshpande

Hi @Steven Stein 

Can you try this approach:

  1. You can use two local variables. FromDate with Default value as AddDays(CurrDate(), -4) and ToDate with Default value as CurrDate(). This will automatically calculate a rolling 5-day window.
  2. In the filter property of your Aggregate, add:  YourEntity.DateColumn >= FromDate and YourEntity.DateColumn <= ToDate
  3. If your Data Grid is displaying data from that Aggregate, it will now automatically show only the records within the rolling window.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.