思路是:将Selected Field values count是否为0作为Clear事件的判断条件。监测到模拟的Clear后,应用预定义的选择了所需默认值的bookmark,实现Clear后自动选择。
1, 声明vMyClearEvent变量,其定义为=if($(=concat(distinct 'GetSelectedCount([' & [$Field] & '])', '+'))=0,1,0)。判断当前Selected Field values count是否为0,成立则vMyClearEvent值为1,否则为0.
2,定义Bookmark,ID为BM01,此bookmark记录了Clear后所需的默认选项.
3,定义vMyClearEvent的OnChange Trigger,Apply Bookmark BM01.
详见附件:
参考
[1] Custom OnClearAll document event in QlikView http://qlikshare.com/856
1, 声明vMyClearEvent变量,其定义为=if($(=concat(distinct 'GetSelectedCount([' & [$Field] & '])', '+'))=0,1,0)。判断当前Selected Field values count是否为0,成立则vMyClearEvent值为1,否则为0.
2,定义Bookmark,ID为BM01,此bookmark记录了Clear后所需的默认选项.
3,定义vMyClearEvent的OnChange Trigger,Apply Bookmark BM01.
详见附件:
参考
[1] Custom OnClearAll document event in QlikView http://qlikshare.com/856
Continue reading Qlikview中自定义Clear事件.