on 01-08-2020 4:43 PM
Hello Experts,
I’m working on Analytics Designer in SAC. As the function of cascading filtering is quite common on the dashboard (e.g. previous Lumira Designer), we want to achieve it on Analytics Designer as well. Component Filter Line seems a good candidate.
However, Filter Line cannot load the data change of source widget during run-time. Also I cannot find any scripting to trigger re-load of its data source. It looks like a one-time loading on the initialization.
If Filter Line can be used as Cascading Filtering, it would be so great!!
Anyone who has some idea or thought, would you please kindly share? A big thanks..
Best Regards,
Tony
Hi Tony,
As on today you cannot achieve the cascading of values in Analytics Designer. Would recommend to Voteup following idea https://influence.sap.com/sap/ino/#/idea/236414
-Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tony,
To achieve cascading between Drop-down or check-box use the below code.
I have implemented this and it work perfectly.
// Adding values to the drop-down or checkbox initially
var data=Table_1.getDataSource().getResultMember(); //Retrieves data filtered
Dropdown_1.addItem("All","All");
Dropdown_2.addItem("All","All");
for(var i=0;i<data.length;i++)
{
Dropdown_1.addItem(data[i]["Dimension1"].id,data[i]["Dimension1"].description); Dropdown_2.addItem(data[i]["Dimension2"].id,data[i]["Dimension2"].description);
}
/*Adding values to the drop-down or checkbox during data change of source widget during run-time "OnResultsetChange"*/
Dropdown_1.removeAllItems();
Dropdown_2.removeAllItems();
var data=Table_1.getDataSource().getResultMember(); //Retrieves data filtered
Dropdown_1.addItem("All","All");
Dropdown_2.addItem("All","All");
for(var i=0;i<data.length;i++)
{
Dropdown_1.addItem(data[i]["Dimension1"].id,data[i]["Dimension1"].description); Dropdown_2.addItem(data[i]["Dimension2"].id,data[i]["Dimension2"].description);
}
/* To Achieve Cascading while selecting a value in Dropdown1*/
var sel=Dropdown_1.getselectedtext();
var filtered_values=Table_1.getDatasource.GetResultMember({"Dimension1":sel},0,500);Dropdown_2.removeAllItems();
Dropdown_2.addItem("All","All");
for(var i=0;i<filtered_values.length;i++)
{
Dropdown_2.addItem(filtered_values[i]["Dimension2"].id,filtered_values[i]["Dimension2"].description);
}
Table_1.GetDatasource().SetDimensionFilter("Dimension1",sel);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.