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

KB10295: How to retrieve and pass prompt answer XML through the URL API using a hidden input form and MicroStrategy SDK


Community Admin

• Strategy


This article discusses how to retrieve and pass prompt answer XML through the URL API using a hidden input form and MicroStrategy SDK.

The following code can be used to retrieve prompt answer eXtensible Markup Language (XML) using Strategy SDK. The code should be called within postCollectData method of a report execution page addon.
//rb is an instance of ReportBean
//pb is an instance of WebPrompts
pb = rb.getReportInstance().getPrompts();
if (pb != null){
pb.setClosed(false);
String promptShort = pb.getShortAnswerXML();
}
The prompt answer XML can be used to pass prompt answers thru URL API as shown in the following hidden form:
<FORM ACTION="http://localhost/MicroStrategy/asp/Main.aspx?server=was-dwu&project=Strategy+Tutorial&evt=4001&reportID=A20C9D0611D60AE310008BB3D1CEE6A4&uid=Administrator&pwd=" method="POST">
<INPUT type="hidden" name="promptsAnswerXML" value= ' <rsl lcl="1033"><pa pt="7" pin="0" did="D7C729D94173B1D72601B4AD9E439BAE" tp="10"><mi><es dirty="1"><at did="8D679D3711D3E4981000E787EC6DE8A4" tp="12" stp="3072" n="Category" disp_n="Category"/><e ei="8D679D3711D3E4981000E787EC6DE8A4:3" emt="1" art="1" disp_n="Movies" disp_id="1"/></es></mi></pa></rsl> ' >
<INPUT type="submit" value="Send">
</FORM>
</body>
</html>
</body>
</html>
Note that the value attribute of the hidden input is enclosed in single quotes. This prevents any conflicts with the double quotes used in the prompt XML.
 
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 21, 2017

Last Updated:

June 21, 2017