Cognos Analytics

 View Only
  • 1.  Clear Date Prompt in C11 using JS and Interactive Viewer

    Posted Tue October 13, 2020 05:10 AM
    Hi,

    i'm struggling to clear the value of a date prompt. Following script works with other prompts but not with dateprompt:

    define(function () {
    "use strict";

    function BasicControl() {
    };

    BasicControl.prototype.draw = function (oControlHost) {

    var oControl = oControlHost.page.getControlByName("test");
    oControl.clearValues();
    };

    return BasicControl;
    });


    any ideas or hints how to clear the date prompt using the prompt control?

    ------------------------------
    Gerhard Lang
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Clear Date Prompt in C11 using JS and Interactive Viewer

    Posted Fri October 23, 2020 03:52 PM
    Can you set it to a future date to make it work for your scenario?

    ------------------------------
    Buddhi Gupta
    ------------------------------



  • 3.  RE: Clear Date Prompt in C11 using JS and Interactive Viewer

    Posted Thu October 29, 2020 04:25 AM
    I can set the prompt to any date i like, but it's not possible to clear the prompt value. it seems that the clearValues() method is not working for date prompts.

    ------------------------------
    Gerhard Lang
    ------------------------------



  • 4.  RE: Clear Date Prompt in C11 using JS and Interactive Viewer

    IBM Champion
    Posted Sun November 08, 2020 04:33 PM
    Date prompts are very buggy. What I do is find the input element, and set the value of that to ''. That will clear the prompt.
    Something like: getControl('Date Prompt').element.value = ''

    ------------------------------
    Paul Mendelson
    ------------------------------