Skip to main content

I have added a filter on a table with the source as snippet, and the snippet is returning the label and values as
{label:'** All Years', value''} 
I want to deactivate a condition after selecting this value, but it is just applying the filter with value empty which is not returning any rows, but if I want to deactivate the condition which will return all the rows is not working.

Any suggestions what is wrong here.

I’m not familiar with this technique, but could the problem be as simple as a missing colon between value and ‘’?


{label:‘** All Years’, value:‘’}


As far as I know, you need a different way to deactivate a condition, because whatever “value” you use, you will always set a value in the end, and that doesn’t deactivate the condition. Please see my response in your other community post, where I described how you can use the “none” option to deactivate the condition declaratively: https://community.skuid.com/t/filter-custom-source-from-snippet-with-custom-action-to-deactivate

Creating filter values and deactivating conditions (and a whole lot more) can be done declaratively, please find more information here:
https://docs.skuid.com/latest/en/skuid/components/original/filter-set/

If you want to use JS to deactivate a condition, please find more information here:
https://docs.skuid.com/latest/en/skuid/api/skuid_model_model.html#skuid.model.Model.deactivateCondition