cancel
Showing results for 
Search instead for 
Did you mean: 

SAC Analytics Designer: How to get dimension members / rows currently in a table?

tristan123
Explorer
0 Kudos

Hi,

EDIT: Due to trying to view how each dimension interacts with each other without any measures turned on, the code fails to execute properly without any measures.

I'm trying to get only the dimension members or rows currently in my table (and not all the dimension members from the model e.g. the User IDs present in the table when the table is filtered on another dimension). How would you go about achieving this?

I have read about using getDataSelections, getResultSet, or get ResultMember, yet all of these return empty arrays or undefined. One of the SAP help pages said something about this being a consequence of lazy load?

Any help will be greatly appreciated.

Many Thanks

Tristan

Accepted Solutions (1)

Accepted Solutions (1)

Marc_Kuipers
Product and Topic Expert
Product and Topic Expert

Hello tristan123

The loading can be controlled by settings, see this blog

If the table is loaded, you should be able to use getResultSet()

For example, this code populates a drop-down with the values in the rows of the table
function onlnitialization(): void
var resultSet = Table_1.getDataSource().getResultSet();
var MyTable=ArrayUtils.create(Type.string);
for (var i=0;i< resultSet.length; i++)
{
MyTable.push(resultSet[i]["COUNTRY"].id);
Dropdown_1.addItem(MyTable[i]);
};
When you execute, the drop-down will have the values set.

Thanks

Marc

Answers (0)