on 2023 Apr 03 9:50 AM
I need to clear all the input filters . I have around 10 input control, but when i am trying to clear its not working. tried so many options like sending " " to the set selected members, passing all. Please advise
Request clarification before answering.
vaishanavibashyam
vaishanavibashyamWith SAC QRC Q2 2023 release two new APIs for dimension filter will be introduced as below
https://blogs.sap.com/2023/04/11/whats-new-in-sap-analytics-cloud-release-2023.07/
You can use below to select All members
InputControl_1.getInputControlDataSource().setAllMembersSelected();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a quick example you could loop through an array of the tables (or charts etc) in the app and remove the filter.
Using the BestRunJuice sample data, the button contains code to remove the 'Sales Manager' dimension filter from all three tables.
We also use a Global script variable to store the 3 table id's before removing the filter.
Button Code:
You can of course enhance the code so it dynamically takes the dimension filter from each table and removes it.
Depending upon performance, the getDatasource call could be made outside of the for Loop as well.
// Write all the table id's to the arr_tables Script variable
arr_tables = Application.getWidgets({type:WidgetType.Table});
// Loop through all the tables stored in the arr_tables script variable and remove the Sales Manager Dimension filter from them
for(var i=0;i<arr_tables.length;i++)
{arr_tables[i].getDataSource().removeDimensionFilter('Sales_Manager__5w3m5d06b5');}<br>
Script Variable 'arr_tables'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have to remove the dimension filter from each widget separately.
you can use this code:
widget_name.getdatasource().removedimensionfilter();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
vaishanavibashyam
Have you tried using the below Script API
Table.getDataSource().removeDimensionFilter
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil: I tried this but I get an error. I have a popup window where I have few charts and a input control. When I select a value in that input control and then close the popup by clicking on the close button I created it closes the popup, which is great. But when I go back and click on the popup the filter that I previously selected is still there. I want to reset the input control on close or when I open the popup. I am not a JAVA developer. Any help is appreciated!
User | Count |
---|---|
41 | |
15 | |
10 | |
9 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.