How can I filter a model to only show events within the next X minutes (refreshed with each page reload)?
Here is what I’ve come up with to address your scenario:
From the setup menu, I first created a number of custom fields on the opportunity object:
- A date time field
- A formula field to calculate the time between now and your date time field
- A formula field (“time from now”) that categorizes your above formula field into groupings based on the time frames you want in the filter later
Here is what the filter looks like on the list view for opportunities:
On the Skuid end, here is what I did in the composer to build the above filter:
Added a model condition to the opportunity model that is filterable default off based on the “time from now” field
Added a filter in the table component that uses the select option (filter type) and manual pick options against my condition above
Specified the source as manual and added values based on the values from the “time from now” field
Hope that works for you!