Hello!
Is there a way to get all members of a single dimension?
I have an application were we want to restore saved pivotviews and I have the issue that I cannot check if a given member exists because I don't find any way to get the members of any dimension.
Additionally it would be great to have a chance to get the names of certain members. For example if we filter a dimension for a single value, I can only obtain the ID of the filtered object, but not its name.
BR
Daniel
Hello Daniel,
seems that you've written a method to save and restore the current layout of a pivot: which dimensions have been choosen for rows and which measures for columns, etc.If it's not too complicated, could you please share it with us? I'm also interested in adding such a feature to my pivot, in order to give user the possibility to recover the last layout of its grid...
Thank you, regards. Maria
I logged an internal issue with Development ID 203841 about the getMembersOfMember API not presented in the API docs.
I also created a case on your behalf with number CAS-159106-T6R9V6, so that you can be notified when there is a resolution for the issue.
You can find your active cases under Account - Support Activity in our website. Select your ticket and go to Development Issues tab to view the status of related development issues.
Best regards,Martin PavlovInfragistics, Inc.
Thank you very much, I think this could be exactly what we're looking for!
You can try the ig.OlapFlatDataSource.getMembersOfMember API (I'll check why this API is not documented).
Here is an example code:
var dataSource = $("#pivotGrid").igPivotGrid("option", "dataSource");
dataSource.getMembersOfMember("[Seller].[Seller].[AllSellers].&[All Sellers]").done(function(members) {
var _members = members.__inner, membersNames = [];
for (var i = 0; i < _members.length; i++) {
membersNames.push(_members[i].uniqueName());
}
});
Hello Martin,
Thank you for your reply!
The method getFilterMemberNames comes close to what we need, but it's not perfect for what we're trying to do because it returns only the selected filters, and an empty array if "all" is selected - But we need a function that returns ALL membernames when no filter is set.
The scenario is that we want to save the state of a pivot view, i.e. members with location, filters and expanded members.
Now if we expand a member (for example the second element of the only dimension on the rowaxis), we get the axis, tupleindex and memberindex in the event "igpivotgridtuplememberexpanding". Now if we want to restore the view we would simply use the method "expandtuplemember" to expand the same axis/tupleindex/memberindex.
The problem is that these indexes may change due to filtering (for example: a filter for the member is set, the first 2 elements aren't selected and the element that has had the index '5' beforehand suddenly has an index of '3').
This is why we'd like a possibility to obtain the filtermembername of the expanded element and save this instead of the index - so we could determine the actual index before restoring.
Unfortunately we didn't find a method we could use for this, even though getfiltermembernames() comes close (it's just that we need a way to get all members if nothing is filtered).