Skip to main content

In the action framework as well as in the Javascript API, triggers on the activation and deactivation of multi-select filters (both autogenerated and manual) do not fire.


Events do fire on the modification of the condition.

The page below is a reproduction of the issue.


A pop up triggered by the action framework should show on deactivation, activation, and modification of the condition, but only works for modification.


An alert triggered by subscription to the appropriate events should show an alert upon deactivation, activation, and modification of the condition, but only works for modification.


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
<models>
<model id="Account" limit="1" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Account">
<fields>
<field id="Name"/>
<field id="Id"/>
<field id="Industry"/>
<field id="AnnualRevenue"/>
</fields>
<conditions>
<condition type="multiple" value="" field="Industry" operator="in" enclosevalueinquotes="true" state="filterableoff" inactive="true" name="Industry">
<values>
<value/>
</values>
</condition>
</conditions>
<actions>
<action>
<actions>
<action type="showPopup">
<popup title="Subscription to condition deactivation is working!" width="90%">
<components>
<template multiple="false" uniqueid="sk-3Qtp-703">
<contents>You have deactivated the industry condition.
(Popup from action framework)</contents>
</template>
</components>
</popup>
</action>
</actions>
<events>
<event>condition.deactivated</event>
</events>
<conditions>
<condition>Industry</condition>
</conditions>
</action>
<action>
<actions>
<action type="showPopup">
<popup title="Subscription to condition activation is working!" width="90%">
<components>
<template multiple="false" uniqueid="sk-3Qtp-889">
<contents>You have activated the industry condition.
(Popup from action framework)</contents>
</template>
</components>
</popup>
</action>
</actions>
<events>
<event>condition.activated</event>
</events>
<conditions>
<condition>Industry</condition>
</conditions>
</action>
<action>
<actions>
<action type="showPopup">
<popup title="Subscription to condition change is working!" width="90%">
<components>
<template multiple="false" uniqueid="sk-3Qtp-972">
<contents>You have modified the industry condition.
(Popup from action framework)</contents>
</template>
</components>
</popup>
</action>
</actions>
<events>
<event>condition.valueChanged</event>
</events>
<conditions>
<condition>Industry</condition>
</conditions>
</action>
</actions>
</model>
</models>
<components>
<filterset model="Account" searchmethod="server" searchbox="true" uniqueid="sk-3Qtp-397">
<filters>
<filter type="multiselect" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="manual" filtermethod="server" labelmode="auto" condition="Industry" filteroffoptionlabel="No Industries Selected">
<sources>
<source type="metadata" effectsbehavior="justdefault"/>
</sources>
</filter>
</filters>
</filterset>
<basicfieldeditor showheader="true" showsavecancel="true" showerrorsinline="true" model="Account" uniqueid="sk-3Qtp-338" mode="read">
<columns>
<column width="50%">
<sections>
<section title="Section B" collapsible="no" showheader="false">
<fields>
<field uniqueid="sk-3Qtp-354" id="Name"/>
<field uniqueid="sk-3Qtp-353" id="Id"/>
</fields>
</section>
</sections>
</column>
<column width="50%">
<sections>
<section title="Section A" collapsible="no" showheader="false">
<fields>
<field uniqueid="sk-3Qtp-368" id="AnnualRevenue"/>
<field uniqueid="sk-3Qtp-355" id="Industry"/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<javascript>
<jsitem location="inline" name="newInlineJS" cachelocation="false" url="">(function(skuid){
var $ = skuid.$;
$(document.body).one('pageload',function(){

skuid.events.subscribe('condition.valueChanged',function(evnt){
alert('You have modified the ' + evnt.conditionName + ' condition (Alert from Javascript).');
});
skuid.events.subscribe('condition.deactivated',function(evnt){
alert('You have deactivated the ' + evnt.conditionName + ' condition (Alert from Javascript).');
});
skuid.events.subscribe('condition.activated',function(evnt){
alert('You have activated the ' + evnt.conditionName + ' condition (Alert from Javascript).');
});
});
})(skuid);</jsitem>
</javascript>
<css/>
<actionsequences uniqueid="sk-3Qtp-265"/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

Thank you for bringing this to our attention. I have alerted our development team of what you are seeing. What I would like to bring to your attention is the ability to set an action based on “Resetting the model.” The page below shows the pop up occur when the filter is “unchecked”, which might be what you’re looking for.

























You have deactivated the industry condition.
(Popup from action framework)

MODEL CONDITION DEACTIVATED







condition.deactivated



Industry









You have activated the industry condition.

(Popup from action framework)


MODEL CONDITION ACTIVATED







condition.activated



Industry









You have modified the industry condition.

(Popup from action framework)


MODEL CONDITION CHANGED







condition.valueChanged



Industry









MODEL CONDITION RESET







condition.reset




























Account













































(function(skuid){

var $ = skuid.$;

$(document.body).one(‘pageload’,function(){


    skuid.events.subscribe('condition.valueChanged',function(evnt){
alert('You have modified the ' + evnt.conditionName + ' condition (Alert from Javascript).');
});
skuid.events.subscribe('condition.deactivated',function(evnt){
alert('You have deactivated the ' + evnt.conditionName + ' condition (Alert from Javascript).');
});
skuid.events.subscribe('condition.activated',function(evnt){
alert('You have activated the ' + evnt.conditionName + ' condition (Alert from Javascript).');
});

});

})(skuid);








Yes, reset covers what I need. Thanks for the assist!


My pleasure! Glad this could provide some help for you!


I believe the event you might be looking for is "condition.reset", aka "Model Condition reset".

https://docs.skuid.com/latest/en/skuid/models/model-actions.html#initiating-events

Yup. You mention that above 🙂.


Reply