How to make Multipicklist value filter for null values in the record.

  • 1
  • Question
  • Updated 3 months ago
  • Answered
I have created a multi picklist field with values A, B, C, D and None. So, the previous records are having the value null for this field. I am not able to filter for null values on Skuid.
Photo of Prateek Kumar

Prateek Kumar

  • 144 Points 100 badge 2x thumb
  • sad

Posted 3 months ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Prateek,

What have you tried? Does a condition where Field__c = null not work for you?
Photo of Prateek Kumar

Prateek Kumar

  • 144 Points 100 badge 2x thumb
Hi Matt,

I have tried multi picklist filter and it does not allow me to add custom condition. Please tell me how to achieve this as the requirement is to use multi picklist with checkbox and the None value in the filter will return the result for Null/None both.

Thanks
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Photo of Prateek Kumar

Prateek Kumar

  • 144 Points 100 badge 2x thumb
Thanks! Matt

So, the listed picklist values for multi select filter are
Apple
Mango
Banana
None

If I select None then the data displayed on the table should be with None and Null values also.

So, the solution which you provided above will work. Right?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Assuming you set up your condition and ui-only multipicklist field to do that, then yes. :)
Photo of Prateek Kumar

Prateek Kumar

  • 144 Points 100 badge 2x thumb
Hey, Matt

I tried the creating a UI only multipicklist with the values, and created the condition and used that UI only field for filter on that page but it doesn't returns anything.

Thanks
Photo of Prateek Kumar

Prateek Kumar

  • 144 Points 100 badge 2x thumb
Thanks! Matt

If you don't mind I am very new to this Skuid. I would love if you help me to tell me more about the steps to create the UI onlly field and condition to work with it.

I am stuck with this task and not able to solve this.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Sorry, I don't have extra cycles to do your work for you at the moment. Go ahead and see what you can do with the threads that I linked to. Maybe then when you've gotten a start you can send your xml so we can take a look and suggest specific next steps.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Photo of Prateek Kumar

Prateek Kumar

  • 144 Points 100 badge 2x thumb
Thanks! A lot Matt. Sure, I will try from my end to do this. If still I found any difficulties I wil let you know.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
If you show us your setup, we might be able to identify where you're going wrong.
Photo of Prateek Kumar

Prateek Kumar

  • 144 Points 100 badge 2x thumb
I created a UI only Multi picklist with Picklist Source as Manual and values where 

Apple
Mango
Banana
None

And the added condition which was looking for the original field value with UI only field.

After that I just added the filter on the table with multi picklist value and when I select any of them 0 results are returned.
Photo of Prateek Kumar

Prateek Kumar

  • 144 Points 100 badge 2x thumb
Can you just tell me a very simple steps.

Like 

If I created the UI only field with the picklist values,

Now how this will have the value which will work in the filter, as the UI only field is not having any existing values.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
You need to do this:

1. Create your multipicklist in its own ui-only model.
2. Create a filterable default off condition on your table's model, in multiple values mode (but don't fill anything in)
3. Create a model action on your ui-only model so that when your multipick field is updated, it activates and sets the value of your table model's condition to the value of the multipick.
4. Add a field editor to your page to display your multipicklist field.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Also, you may need to use some branch logic in your action sequence when the ui-only multipicklist is changed, to decide whether to deactivate the condition (if the field doesn't have a value).

You may also want to use a "none" branch so that if the value is "None" you also activate a Field__c = null condition.