Deactivate a model's filterable conditions using Javascript

Further to this post: In the same function, before I set the model’s condition, I want to deactivate all other filterable conditions so that I can be sure that the user is seeing the right set of data. I know how to deactivate conditions by name (as described here: But we can’t know for sure at runtime how many filters there are, so this is too hard-codey. And I don’t want to deactivate all conditions for the model, just filterable ones. Is there a simple property to check perhaps? Thanks … and happy new year. May it be as huge as 2013, eh? Glenn.

Still wondering on this one. Any thoughts? Thx.

My advice would be to iterate over all Conditions in the Model, and if a Condition’s “name” property is set, then assume it’s Filterable, as only Filterable Conditions should have Names.

var $ = skuid.$; var myModel = skuid.model.getModel('Opportunities'); $.each(myModel.conditions,function(i,condition){ if ( myModel.deactivateCondition(condition); }); <br>

Ah yes, that makes sense, and very simple. I’ll give it a try.

Yep, works like a charm. Thanks.