on ‎2023 Jul 26 10:22 AM
I have the problem that I would like to access the global story filters of the story via scripting. Do I have the possibility to read these values via a get function and can I also set the filters via a function? ....getDataSource().getDimensionFilters(...) is not even showing me the selected filter values of the story filter.
Thank you for your help
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right, 2023 QRC3 update will provide the exact API you need to get and set value for story filter .
brian.jespersen
Its discussed in below blog, Chapter Script API for Story Filter Bar
https://blogs.sap.com/2023/06/22/whats-new-in-sap-analytics-cloud-release-2023.13/#3
Nikhil
try this:
var modelID="Cl7s7e1rj7i8amn7vo60oqj40d"; // your model id
var dimensionID = "0PROFIT_CTR"; // your filter dimension
var selectedFilterValues = Application.getFileDataSource(modelID).getDimensionFilters(dimensionID);
console.log(selectedFilterValues);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
if you would like to get filter values from linked analysis please vote for this improvement request.
br
edgar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
kumkej Until now it´s not possible to read the selected values from an Story Filter directly. But, you can use a workaround based on the cascading filter effect of story filters.
1. Create your Story Filter and ensure the cascading effect is enabled
2. Create a Input Control (IPC) for the same DIM on the page you would like to integrate the Script. (You can disable all links of the IPC to other widgets and you can hide the IPC, because it is only a "helper" IPC.
3. Now you´re able to read the selections via script from the Story Filter via the IPC, because there are the same entries selected, caused by the cascading effect of the Story Filter.
Example:
//Story Filter on DIM "Date"
//InputControl(IPC) on DIM "Date" as well - now you can read the Date selections from your Story Filter
var sel_date = IPC_1.getInputControlDataSource().getActiveSelectedMembers();
console.log("sel_date");
console.log(sel_date);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
kumkej
kumkejIn responsive layouts the API's return blank but if its a canvas layout ...getDataSource().getDimensionFilters(...) should return the filter values.
Hope this helps
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.