QueryLabel object
Represents a collection of members defined for a label in CubeQuery.
The Count property of this collection reads the number of member selectors for the parent label. If the value of Count is zero, there are no member selectors.
The Item method of this collection returns the member select at the given index. If Index is given as a numeric value it must be between 1 and the value returned by the Count property. If Index is not within this range an ItemNotFound exception is thrown. If Index is given as a string it must match the member name of one of the member selectors. If it does not an ItemNotFound exception is thrown.
The RemoveAll method removes all member selectors from the label. This method should not be used as an the argument to MemberSelectors.RemoveAll() in anInteractive Reporting document file (bqy) It is only meant to be used for Interactive Reporting document file run as jobs. By default the KeepLabel argument defaults to false, meaning the label is removed. If set to true, the label is kept but has no member selectors.
This example shows how to display the number of members for the “Market” dimension in an Alert box:
Alert(ActiveDocument.Sections["Query"].Rows["Market"].MemberSelectors.Count)
This example shows how to return the member selector at a given index:
var selector = Sections["Query"].Rows[1].MemberSelectors[1]; var selector = Sections["Query"].Rows[1].MemberSelectors["100-20"]; var selector = Sections["Query"].Rows[1].MemberSelectors.Item(1); var selector = Sections["Query"].Rows[1].MemberSelectors.Item("100-20");
This example shows how to remove all member selectors, but retain the label:
Sections["Query"].Rows[1].MemberSelectors.RemoveAll(); Sections["Query"].Rows[1].MemberSelectors.RemoveAll(true);
Item value as name or index, RemoveAll([optional] KeepLabel as Boolean)
Read only: Count as Number: