Skip to Content
0
Jan 29, 2021 at 03:23 PM

SAC App designer - dropdown list shows all members of a hierarchy

296 Views

Hopefully a simple one to answer, how do I populate a dropdown list with values from a specific level in a hierarchy?

Example:
Dimension: "Cost Centre"

Structure might be:

lvl1: Region
lvl2: - North
lvl3: - North East
- North West
lvl2: - South
lvl3: - South West
- South East

Currently my dropdown shows a list of all values
(Region, North, North East, North West, South, South West, South East)

What I want to see in the dropdown is only 2 values from Level 2 in the hierarchy (North & South)

My oninitialization script is:

var cc = tbl_Lookup.getDataSource().getMembers("Cost_Centre");

for (var i=0;i<cc.length; i++)
{ Dropdown.addItem(cc[i].id,cc[i].description);
}

I've tried setting the hierarchy level (which I can do on a table) but no idea how to force the dropdown to only show values from level 2 in the hierarchy :(