Filter by values present in table

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I'd like to know if it possible to create a multi-select table filter that only shows values that are present in the table.

If this isn't possible, I'd love to see it implemented in a future release.
Photo of pFranzen

pFranzen

  • 222 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Do you want the multi select values to dynamically update based on what is in the table and not what is in the org?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
This is possible with our normal drop down box filter - when your filter source is an aggregate model grouped on the picklist field.  This shows values actually in the data rather than what is provided from field metadata.   This does not work for multipicklist filters because we do not let you use a model as the source for the multipicklist filter.  We will consider this for a future release though.
Photo of Anna Wiersema

Anna Wiersema

  • 10,890 Points 10k badge 2x thumb
My mind is blown right now.
Photo of pFranzen

pFranzen

  • 222 Points 100 badge 2x thumb
Thanks, that's helpful. A multi-select picklist would be even better though. If a model returns a list of accounts that span 12 different US states, I'd love the picklist to show only those 12 states and allow me to pick 3 or 4 of them.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
That's the part that needs clarification though. Is it that you want to dynamically update the list of states to what's currently in the model? Hopefully not.

I believe that the options available are only generated on page load and not dynamically changes without a serious effort with code.

Best I would suggest is to do the same as Rob, except make sure that it represents only the states as they are loaded into the table on page load. So, add a condition on the aggregate model to only include records found the in model that represents the table.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
If you're not afraid of hacking the XML for the page, you can have the filter be multi picklist now.