Multi-Select filter option for non-picklist fields

  • 4
  • Idea
  • Updated 1 year ago
  • Implemented
In the new Superbank release, there's now the option to add a multi-select filter to a table. This is great but only seems to allow picklist fields to be used. We really need to be able to use fields like "OwnerId" (for multiple user filtering) and "RecordTypeId" (for multiple record type filtering). Could we not provide a model for the selectable options like we can currently with a regular "select option" filter?

It would also be great if the new automatic condition table filtering could use non-picklist fields.
Photo of Oliver Sinfield

Oliver Sinfield

  • 922 Points 500 badge 2x thumb

Posted 4 years ago

  • 4
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,262 Points 20k badge 2x thumb
Oliver, we are working to expand the scenarios where Multi-Select filters are available --- didn't make it into the initial Superbank release, but it may appear soon, stay tuned!
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
I second this.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
Got this work without issue by manually setting the table filter type to "multiselect" and conditions to multiple specified values.



Resulting queries work as expected.
(Edited)
Photo of Jared Jones

Jared Jones

  • 2,214 Points 2k badge 2x thumb
Hi Pat - What did you do to be able see the soql in the developer console?  I'm using this method, but when I deselect all, apply, it appears the table is filtered as Region = "" (none).  The second time I deselect all, apply, then I get the expected Region = any.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
Here you go.

Photo of Jared Jones

Jared Jones

  • 2,214 Points 2k badge 2x thumb
Thanks for the fishing lesson, Pat.  Hope you have a great weekend!
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
You may have discovered a feature we didn't specifically build. Cool!
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,262 Points 20k badge 2x thumb
As of the GA Superbank release, which has been pushed to all Production and Sandbox orgs as of last Friday night, Multi-Select filters are available on Picklist, Multipicklist, and Reference (lookup/master-detail) fields. So you shouldn't have to use Pat Vachon's hack to get this to work, we spent a lot of time working on adding in Reference field support over the past month.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
Maybe I'm missing something but I can't figure out how to get it to work. I don't get "Pick Options and Conditions" when selecting "Multi Select Option" as the filter type.

I want the options to only be from another model I set up where the records are related to the current "Job".
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,262 Points 20k badge 2x thumb
Pat, some mis-communication here --- you are correct, there is not a "supported" way to do a Multi-select Filter where you "Pick Options and Conditions", so your method works for this approach. What I was referring to is the ability to do Multi-selects on Reference fields where Pick Options and Conditions is "Automatically" --- this is the new capability. So no, there's no supported way to do it manually on Reference fields where you pick a Model source to use, but you can do it Automatically.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
I'm still missing something then.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
Pat - what version of Skuid are you running in this org? 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
6.8.1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
Weird,  cuz I can get the type ahead to populate values for reference fields in aggregate models.. Both directly on the object and on the parent object. 

We recognize that the type ahead is not as intuitive as the classic multiselect control.  But we are worried about large volumes of relation values.  It seems the type ahead allows for more easy finding.  We are still looking at some Ux optimization here. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
I'm ok with type ahead, but I don't get the option to limit which values are available like I can when I specify that the values come from a model.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
The multiselect doesn't seem to hit the nail on the head. Here are the results of the two.

1. Built in functionality



2. Hacked method

Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
As I said earlier,  the hacked method is going to be problematic when you have 100 records in your reference.  We might set some boundary like we do on option select filters,  but that's what it is...   

How else would you like the nail hit? 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
The auto create one doesn't render ever as a multi select on a reference field.
(Edited)
Photo of Pedro Linhol

Pedro Linhol

  • 110 Points 100 badge 2x thumb
Hi,

Any news or workarounds available regarding this issue?
Would it be possible to populate a table filter from JS snippet? If so, how?

I need to show a multi-select table filter based on a Reference field but with the look & feel of a "normal" picklist table filter.

Thanks
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,262 Points 20k badge 2x thumb
Pedro, so you want a Multi-select Filter based on a Reference field that looks like a single-select table filter? How would the user be able to select multiple Reference field values using the single-select picklist? Skuid already allows you to do Multi-Select on Reference fields, and the UI is the way it is precisely because the single-select UI doesn't make sense when picking multiple values. 
Photo of Pedro Linhol

Pedro Linhol

  • 110 Points 100 badge 2x thumb
Hi Zach,

Not realy, what I realy need is a multi-select table filter based on a Reference field that looks like the multi-select picklist as shown in the picture (based on the values of the reference field values in the table:

Photo of Zach McElrath

Zach McElrath, Employee

  • 49,262 Points 20k badge 2x thumb
Okay, I see. That makes sense.
Photo of Pedro Linhol

Pedro Linhol

  • 110 Points 100 badge 2x thumb
Any thougths for a possible solution or a workaround?
Photo of Dennis Atwood

Dennis Atwood

  • 72 Points
I'd also like to know if there's a trick to make this work.  It's possible to create a select filter with manual options sourced from a field on an aggregate model, essentially making a text field work like a native picklist.  It doesn't seem like a stretch to do this with multi-select, but you don't get a manual option for multi-select filters.

EDIT:  Actually the hack works for this case too!  If you create a select filter and set up your options manually (in my case from an aggregate model that returns all unique values of a text field) then all you need to do is edit the XML and change filter type from "select" to "multiselect".  
(Edited)
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
K. There is a simple solution to this if you know where to tweak in the XML and how to set the condition.

The solution is the same as posted 12 months ago with one additional tweak. Set  in the XML autocompthreshold="25" to either "" or a bigger number such as "500".

So, to recap the steps.
  1. Create a condition where value is set to "Multiple specified values"
  2. Create a Filter where "Pick Options and Condition(s)" is set to manual. Select the condition from step 1. Set the Source with "Source Type" set to Snippet. Type in your snippet name.
  3. Open the XML and update two parameters on your filter as per the pic below.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
Thanks again Pat.  (or should I say mB Pat).  Its great when an old answer serves another purpose. 
Photo of Rajendra Rathore

Rajendra Rathore

  • 1,480 Points 1k badge 2x thumb
HI All,

Is it possible to use Manal picklist options for multi select filters on Table?

I can see manal option for single select filter only.

Thanks,
Raj