Select filter on Date, with option for custom date range.

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I've built a filter on a date field with manual options that looks like this (using the SFDC date filters like LAST_MONTH).

I'd like to add another option to the list called "Custom" or some such descriptive name..... and allow the user to select or type in a custom date range.

Seems like the only thing I can do with a filter is affect a model condition. I was trying to figure out a way to use a condition on a ui-only field to somehow trigger an action.

I can add another filter on the table... a standard date range... but filters cannot be conditionally rendered (which would be handy, at least in this case)...

Anyone see a way to accomplish this? It would be super-helpful for report building.
Photo of Matt Sones

Matt Sones, Champion

  • 32,106 Points 20k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,828 Points 20k badge 2x thumb
In a report building scenario,  you might have luck with building filters out of arbitrary field editors.  These certainly can be conditionally rendered.  You might have a toggle that lets you choose from a set picklist of date filters,  or from specified fields.  See this example. Its not date related, but it shows the arbitrary field editor - as filter - model.