If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Filter data with the prompt pre-selected

Started by Fulvio, 20 Mar 2009 09:02:09 AM

Previous topic - Next topic

Fulvio

Hello,

i would display dynamically first item in a value prompt and to reflect that item.
I used following java script :

            <script language="JavaScript">
                 function setDefaultValue()
                 {
                      var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
                      if (fW)
                      {
                           fW._oLstChoicesPrompt1.options[0].text = 'Bikes';
                           fW._oLstChoicesPrompt1.focus();
                           fW._oLstChoicesPrompt1.blur();
                       }
                 }
                 setTimeout("setDefaultValue()", 10);
           </script>



With this i am able to display the value in the prompt as indicated in the script
but are unable to view the filtered data for that value.

Can you help me?

Fulvio

Hi,

There is nobody that can answer to me ?

Sunchaser

Hi,

If the datas that should be filtered are linked to the value-prompt like a "cascading source", you should try in your javascript a code to do a "reprompt" of the page after you put the value in the value-prompt.

I don't have the code here for the moment (and I don't remember correctly, maybe it's like "setPromptAction(...)"), but I think you can find it.


Sunchaser

Hi,

Try something like:

setPromptControl('reprompt');

Fulvio


Sunchaser

Hi,

No, I didn't mean that.
I'm nearly sure that it's possible to call the same behaviour as a reprompt button with something like:
"javascript:setPromptControl('reprompt');"
in a code.

I can't really test again, as one of my PC used for personnal testing has "crashed down", and I'm in a real nightmare now...


Fulvio

Hi

I proved to add

setPromptControl('reprompt'); after
setTimeout("setDefaultValue()", 10); statement

and give me these errors:

Error: Object Expected
Error: Unable to move the focus to control because no visible, enabled or of a type that can not be made active.