on 2024 Jan 29 7:58 AM
Hello, I am currently working in dropdowns within SAC and I am attempting to utilize dropdowns as a manual input for users. I have successfully brought in various inputs from models into Stories via properties and dimension. Although, where I am currently stuck is I am unsure as to how to bring in hierarchies into these dropdowns. I wish to have a cascading dropdown(Dropdown 1 = Hierarchy lvl 1, Dropdown 2= Hierarchy lvl 2). Can I get any help on this?
This is how the parent Hierarchies look like(The ones I've brought in) and I wish to have the ability to break them down further. The code I have used for this is a simple getHierarchies() function.
Any help at all would be greatly appreciated!
Request clarification before answering.
This may have been answered elsewhere, but i'm finding using the new community pages a total pain.
In the past I've used the approach of a hidden table that I pull dimension members from.
The table is filtered using the SetHierarchyLevel parameter.
The logic I used is below
Model: n/a
Dimension: Geo
Table Name: Table_1
Dropdown: Dropdown_1
Script: Most likely placed in the OnInitialization event for the dashboard.
Table_1.getDataSource().setHierarchyLevel("Geo",1); //set Table_1 hierarchy to level 1 (Country)
var Geovals = Table_1.getDataSource().getResultSet(); //get the values returned in Table_1
for(var i=0;i<Geovals.length;i++){
var id = Geovals[i]["Geo"].id;
var description = Geovals[i]["Geo"].description;
Dropdown_1.addItem(id,description);
//Get the result set and restrict it to values for the Geo dimension, add the values to the dropdown list
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.