on 03-11-2024 3:40 PM
Hello all,
I am struggling with the population of my dropdown from a live connection with the members of a dimension. I got a "Kalenderjahr" Dimensions with Members e.x. "2020", "2021", etc. - I want to populate my Dropdown with this Members.
My following code does not populate the dropdown by initialization of the canvas:
var i=0;
var Kalenderjahr = Table_1.getDataSource().getMembers("Kalenderjahr");
for(i=0; i < Kalenderjahr.length; i++)
{
Dropdown_1.addItem(Kalenderjahr[i].id);
}
As a result I want to have a Dropdown with which I can filter the Measure of the Workdays, but still I am not able to retrieve any Members in my Dropdown for selection. Anyone an idea why it is not working?
BR
Hi zamo02,
try this (replace dimension as needed):
var dimMembers = Table_1.getDataSource().getMembers("0CALYEAR");
for (var i = 0; i < dimMembers.length; i++) {
Dropdown_1.addItem(dimMembers[i].id);
}
dimMembers is of type Memberinfo which means you have to specify if you would like id/description,...
br
edgar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you console.log(Kalenderjahr); and see what is the output in the browser console.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.