Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
3 replies Latest Post - ‏2012-11-26T19:53:22Z by BirajSaha
OmMuppirala
OmMuppirala
4 Posts
ACCEPTED ANSWER

Pinned topic How to expand a tree prompt node using Cognos Mashup Services api?

‏2012-10-11T22:00:18Z |
Hi,

I am using CMS and LDX to parse and display a tree prompt in Flex. Here is the snippet from my LDX xml that contains the tree prompt:

<item xmlns="http://www.ibm.com/xmlns/prod/cognos/layoutData/200904">
<p_tree>
<id>
_P1017559705
</id>
<ref>
R13
</ref>
<style>
S13
</style>
<pname>
pTreePrompt
</pname>
<multi>
true
</multi>
<cascadeon>
Select a prompt style
</cascadeon>
<rows>
5000
</rows>
<treeUI>
NORMAL
</treeUI>
<canexpand>
true
</canexpand>
<memberDisplayCountDefault>
20
</memberDisplayCountDefault>
<memberDisplayCountLimit>
50
</memberDisplayCountLimit>
<maximumValueCount>
20
</maximumValueCount>
<skipValueCount>
0
</skipValueCount>
<selOptions>
<sval>
<use>
Dimensional.Product PPG Dimension.Product PPG Hierarchy.Merchandizing Hierarchy->all
</use>
<disp>
Merchandizing Hierarchy
</disp>
</sval>
</selOptions>
</p_tree>
</item>
As you can see, I get only the root node when I render this Tree. What API could I call to expand the root node and get the child nodes?

It would be great if someone can help out. Please let me know if you need more information to be able to answer this question.

Regards,
Om
Updated on 2012-11-26T19:53:22Z at 2012-11-26T19:53:22Z by BirajSaha
  • BirajSaha
    BirajSaha
    11 Posts
    ACCEPTED ANSWER

    Re: How to expand a tree prompt node using Cognos Mashup Services api?

    ‏2012-10-15T18:22:00Z  in response to OmMuppirala
    Hi there,

    You would first run the "reportPrompts" API command, which is an asynchronous command that returns a "sessionOutput" URL.
    You then need to run this URL but appended with a "/treePromptNode" secondary command followed by the name and member unique name of the prompt parameter representing the node to be expanded (Note that the value must be encapsulated via CDATA).

    e.g. (using gateway "http://myserver.com:80/c10" and report store ID: "i83A31B0ADC8044489A66F7C91974CEA3")

    1. Run the reportprompts command

    http://myserver.com:80/c10/cgi-bin/cognos.cgi/rds/reportprompts/report/i83A31B0ADC8044489A66F7C91974CEA3
    ==> this will return a sessionOutput URL like "http:/myserver.com:80/c10/cgi-bin/cognos.cgi/rds/sessionOutput/conversationID/i58C8E896CCAA47AE95E1105D4A71BC7E"

    2. Run the treePromptNode secondary command on the sessionOutput URL, in this example on the root member of the "Retailers_type" level for parameter "Parameter1"

    http://localhost/c10_64/cgi-bin/cognos.cgi/rds/sessionOutput/conversationID/i58C8E896CCAA47AE95E1105D4A71BC7/treePromptNode?p_Parameter1=<[[CDATA[great_outdoors_sales_en.Retailers.Retailers.Retailers->PC.@MEMBER.Retailers_type)]]>
    Please try this out and see if it works for you.
    • OmMuppirala
      OmMuppirala
      4 Posts
      ACCEPTED ANSWER

      Re: How to expand a tree prompt node using Cognos Mashup Services api?

      ‏2012-10-15T18:37:55Z  in response to BirajSaha
      Biraj,

      That was perfect. Exactly what I was looking for. Thanks a lot!

      Om
    • BirajSaha
      BirajSaha
      11 Posts
      ACCEPTED ANSWER

      Re: How to expand a tree prompt node using Cognos Mashup Services api?

      ‏2012-11-26T19:53:22Z  in response to BirajSaha
      Actually the syntax for (the CDATA part of) the treePromptNode URL snippet above is not quite correct. It should be:
      /treePromptNode?p_Parameter1=<![CDATA[great_outdoors_sales_en.Retailers.Retailers.Retailers->PC.@MEMBER.Retailers_type)]>