EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB203256: How to Display the Name and Attribute Qualification Elements of a Custom Group Programmatically using MicroStrategy Web SDK 9.4.x


Community Admin

• Strategy


SUMMARY: This Technical Note shows how a user can retrieve a custom group object to display its name and attribute qualification elements.
 
The following code is a sample that shows how to programmatically retrieve a custom group object to display its name and attribute qualification elements:
 
//Retrieve and populate the object
WebCustomGroup cg = (WebCustomGroup) objectSource.getObject("4363D0C84FE93066B5B631AC07CED3CB",EnumDSSXMLObjectTypes.DssXmlTypeFilter);
cg.populate();
WebExpression we = cg.getExpression();
//Traverse through the expression tree to get the elements
WebNode root = we.getRootNode();
//Retrieve the first qualification on the Custom Group
WebElementsObjectNode on = ( WebElementsObjectNode) root.getFirstChild().getChild(1);
WebElements web_ele = on.getElements();
for(int i = 0;i < web_ele.size();i++) {
     //Output the element name
     System.out.println(web_ele.get(i).getDisplayName());
}
//Output the Custom Group name
System.out.println(cg.getDisplayName());
 
Note: The example above applies to custom group objects with Attribute Qualification of type “In-List”.
 
ADDITIONAL INFORMATION:
The Strategy SDK allows you to customize the standard Strategy Web interface, and extend and integrate the Strategy business intelligence functionality into other applications. However, before changing the way Strategy Web products look or behave, it is helpful to understand how the application is built. For more information regarding the Strategy Web architecture or the process of customizing Strategy Web, please refer to Strategy Developer Zone (https://resource.microstrategy.com/msdz/).
Customization Warning:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.


Comment

0 comments

Details

Knowledge Article

Published:

June 22, 2017

Last Updated:

July 17, 2017