Skip to main content

Set Up Grid View By Groups: 1 Group for records dated in the future, 1 group for records in the past

  • May 15, 2023
  • 3 replies
  • 24 views

Forum|alt.badge.img+4

I have a grid view in my base shared with a specific group of people, it includes all records with a date/time within five days in the future AND all records in the past.

For easy viewing and sorting, is it possible to group the records into two groups:

Group 1: all records dated for today and five days in the future

Group 2: all records to date before today.

Is this possible?

3 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Yeap, you could do this with a formula field like so:

 

 

IF( DATETIME_DIFF(TODAY(), {Date}, 'days') > 0, "Before", IF( DATETIME_DIFF(TODAY(), {Date}, 'days') > -5, "Within 5 days" ) )

 

 


Forum|alt.badge.img+4
  • Author
  • Participating Frequently
  • 7 replies
  • May 15, 2023

Thanks so much Adam, this looks like what I'd want. Sorry for the 'beginner' question, but how do I deploy this formula in the Grid?


TheTimeSavingCo
Forum|alt.badge.img+31

Thanks so much Adam, this looks like what I'd want. Sorry for the 'beginner' question, but how do I deploy this formula in the Grid?


Ah, add a formula field, and then copy and paste the formula into it.  You'll need to modify the formula to point at the correct field though, specifically you'd probably need to modify the value {Date}.

If you could provide a screenshot of your current table with the date field I could provide you with the modified script right quick too