Result of Snippet for table filter, deactivate condition doesn't works

  • 1
  • Question
  • Updated 2 weeks ago
  • Answered
  • (Edited)
<source type="custom" effectsbehavior="defaultandothers" snippet="AllYearsValue">
<effects> <effect action="deactivate" value="" condition="Academic_Year__c"/> </effects> </source>
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.
Photo of Prateek Kumar

Prateek Kumar

  • 276 Points 250 badge 2x thumb

Posted 4 weeks ago

  • 1
Photo of Mike Dwyer

Mike Dwyer, Champion

  • 4,716 Points 4k badge 2x thumb
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:''}
Photo of Luzie Baumgart

Luzie Baumgart, Official Rep

  • 3,510 Points 3k badge 2x thumb
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/skuid/topics/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