Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
Expand all | Collapse all

Getting Prompted Twice

  • 1.  Getting Prompted Twice

    Posted Wed January 22, 2025 05:02 PM

    Cognos 12.x

    I took an existing report that prompts for: 

    Company, Year, From Period, To Period, From GL Account and To GL Account (all required)

    I changed the two GL Account prompts to Cascading dropdowns (Company is the parent).  All was fine.

    I then used an expression to provide default values to the Year, From and To periods.  

    When a user runs the report and clicks the "Finish" button, they are prompted for the From and To GL Accounts again.

    No idea why?



    ------------------------------
    Greg Wilburn
    Director of IT
    Total Biz Fulfillment
    Grantsville MD
    ------------------------------


  • 2.  RE: Getting Prompted Twice

    Posted Thu January 23, 2025 05:01 AM

    Do you have CogBox installed? If so, on that page can you open the edit parameters screen and paste in a screenshot? It should show the active parameters at that point. 

    If you don't, open the browser's developer toolbar and paste this in:
    __glassAppController.glassContext.getCurrentContentView().getAuthoringApplication().GetParameterValues().map(x=>{x.value.map((y,z)=>{console.log("Parameter Name: " + x.name + " - use value " + z + ": " + y.use + " - display value: " + y.display)})})

    It will show all of the active parameters. 

    One idea does come to mind though, is it possible that the selected GL Accounts don't appear in the dropdowns? Or maybe the data types don't match? If the prompt is defined as a prompt alias (e.g. [Acct] >= ?pFromAcct?) there are some validations that are performed on the selected values.



    ------------------------------
    Paul Mendelson Product Manager
    Product Manager
    PMsquare
    ------------------------------



  • 3.  RE: Getting Prompted Twice

    Posted Thu January 23, 2025 08:29 AM
    Edited by Greg Wilburn Thu January 23, 2025 08:30 AM

    We are new to Cognos - never heard of Cogbox.  Using the dev tools and the command, I can see 4 of the 6 parameters.  But I do not see the parameters listed for the GL Accounts.  The dropdown is on the screen and it is populated with data.  It may be easier just to delete and recreate the prompts?

    Not sure what this is

    The parameters are used in the query like this:



    ------------------------------
    Greg Wilburn
    Director of IT
    Total Biz Fulfillment
    Grantsville MD
    ------------------------------



  • 4.  RE: Getting Prompted Twice

    Posted Thu January 23, 2025 09:26 AM

    After deleting and recreating the prompts, it was working as expected.  That is until I changed the prompt text (Header Text) to blank - so the user doesn't see the parameter name.  After doing so, I am now getting prompted again for the GL Account values.

    This seems like some sort of bug.  I'm new to Cognos, but I've used a lot of web development tools.  This is by far the most quirky that I've encountered.

    I feel like I'm wasting a lot of time on something that should be rather simple.



    ------------------------------
    Greg Wilburn
    Director of IT
    Total Biz Fulfillment
    Grantsville MD
    ------------------------------



  • 5.  RE: Getting Prompted Twice

    Posted Thu January 23, 2025 11:25 AM

    Out of curiosity, are you using any JavaScript to select the first value? Is the user actually selecting the value?



    ------------------------------
    Paul Mendelson Product Manager
    Product Manager
    PMsquare
    ------------------------------



  • 6.  RE: Getting Prompted Twice

    Posted Thu January 23, 2025 02:58 PM

    I am using a default value on the parameter



    ------------------------------
    Greg Wilburn
    Director of IT
    Total Biz Fulfillment
    Grantsville MD
    ------------------------------



  • 7.  RE: Getting Prompted Twice

    Posted Fri January 24, 2025 03:42 AM

    I see what's happening here. You have all the other parameters being populated here, but not pFromAcct or pToAcct. Try creating parameters for each. I recommend setting row limit to 1, since the parameters are singles. Honestly, I think the bug here is that the prompts are populating default values at all. 



    ------------------------------
    Paul Mendelson Product Manager
    Product Manager
    PMsquare
    ------------------------------



  • 8.  RE: Getting Prompted Twice

    Posted Thu January 23, 2025 10:14 AM

    Hello Greg, 

    Check the prompt names on your prompt page matches with the names you used in the queries. Sometimes if the names are different this appears.

    Thank you,

    Uday. 



    ------------------------------
    Udaya Rani Palli
    ------------------------------



  • 9.  RE: Getting Prompted Twice

    Posted Thu January 23, 2025 11:15 AM

    Hey Udaya!  Hope you're doing well..

    The prompt names match exactly to the names in the query.  I've deleted and recreated the prompts several times.  Each time, the prompts work as expected until I change the Header Text for the prompt to blank.  AFTER doing that is when I am prompted again for the GL Acct Numbers.  

    Even if I change it back to "default", the double prompting continues.  I have to delete the prompt and recreate to correct.



    ------------------------------
    Greg Wilburn
    Director of IT
    Total Biz Fulfillment
    Grantsville MD
    ------------------------------



  • 10.  RE: Getting Prompted Twice

    Posted Fri January 24, 2025 03:49 AM

    Hi Greg,

    Did you use the new Defining default parameter values feature? I've played with this feature and I've been prompted twice in some case.

    Best regards,



    ------------------------------
    Patrick Neveu
    Collaboration Betters The World (CBTW)
    IBM Champion
    ------------------------------



  • 11.  RE: Getting Prompted Twice

    Posted Fri January 24, 2025 09:06 AM

    Patrick – that is exactly what I used for the Company, Year and from/to periods. For the company, I set the default to the dropdown list. However, I did NOT set default values for the GL Accounts (from and to).

     

    Paul... I added default values for the From/To GL account parameters and removed the "header text" on the prompt... It is no longer prompting a second time.

    It wouldn't let me use the value from the query used for the cascading prompts, so I just did empty text.  Recall these prompts are cascading from the Company selection.

     

     

    Thanks so much for the help!!

    Greg

     

     

    Greg Wilburn
    Director of IT
    301.895.3792 ext. 1231