cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown doesn't work like Input control filter in SAP Analytics Cloud

satoko_nakayama
Explorer
0 Kudos

Hi Team,

The Dropdown does not behave like Input Control in SAC.
I set up a drop-down list script so that I can filter the table data by the customer dimension into keys. The Dropdown itself could be set, but the results are not filtered by the selected customer.

(1)The script setting

satoko_nakayama_1-1707471832255.png

(2)Result: Data is not filtered by the selected customer. I want to display the result  only with selected customers.

satoko_nakayama_2-1707471976748.png

On the other hand, if I select the same customer in the Input Control, the result will be displayed correctly.

satoko_nakayama_3-1707472265591.png

How do I modify the script so that I use Dropdown correctly?

View Entire Topic
N1kh1l
Active Contributor

@satoko_nakayama 

Just populating the dropdown will not result in filtering of the table. You have to write a script in onselect event of the dropdown to filter the table.

Something like below. Please check the API details in API reference.

var customer = Dropdown_1.getSelectedKey();

var ds = Table_1.getDataSource();

ds.removedimensionfilter("customerdim");

ds.setDimensionFilter(customerdim, customer); // change as per your dimension name

 

Br.

Nikhil

satoko_nakayama
Explorer
0 Kudos
Your prompt and clear instructions helped me a lot. This matter has been resolved. Thank you from the bottom of my heart.