May 14, 2023 05:36 PM
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?
May 15, 2023 12:34 AM - edited May 16, 2023 10:33 PM
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"
)
)
May 15, 2023 10:58 AM
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?
May 16, 2023 10:32 PM
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