Global Business Analytics

 View Only
  • 1.  Error in making a custom widget for reset filter to be applied in the dashboard

    Posted 11 days ago

    Hello All, I am currently working on a requirement to make a reset filter button using custom widget to be applied on a dashboard in the Cognos Version 11.2.4 by packaging custom HTML/JavaScript file and spec.json in a zip file. However when I upload the zip file under Manage-> Customization->Extensions I receive the error as given in the screenshot .

    Please find the code of the custom HTML/JavaScript file and spec.json file . Also find the screenshot of the information obtained on using browser developer tools (right-click on the filter and select "Inspect" or press F12) to examine the HTML structure and identify the classes or IDs used for the filter applied on the dashboard



    ------------------------------
    Priya Sengar
    ------------------------------

    Attachment(s)

    json
    spec.json   405 B 1 version
    txt
    HTMLJavaScriptcode.txt   763 B 1 version


  • 2.  RE: Error in making a custom widget for reset filter to be applied in the dashboard

    Posted 10 days ago

    Hi, you're spec.json does not meet the CA Extension schema requirements. See: https://www.ibm.com/docs/en/cognos-analytics/11.2.0?topic=views-specjson-description

    I believe what you are trying to add is a "collectionItem" to an existing "collection" but I'm not sure.

    Your "collectionItem" plugin needs to be part of a feature and then added to the applicable "existing" widget collection via the collectionId key (:
    eg:
    ...
        "features": [{
            "id": "com.ibm.bi.notebook.widgets",
            "collectionItems": [
                {
                    "containerId": "com.ibm.bi.dashboard.widgets",
                    "id": "notebook",
                    "label": "notebook",
                    "builtin": true,
                    "ownTitle": false,
                    "createContentNode": false,i
                    "widget": "notebook/DashboardWidget",
                    "layoutConsumeView": "dashboard/layout/views/Widget"
                }
            ]
        }
    ...

    If you have access to the CA install, please see the extension samples provided under <CAInstall>/samples/extensions

    Good luck!



    ------------------------------
    Shawn Crook
    ------------------------------



  • 3.  RE: Error in making a custom widget for reset filter to be applied in the dashboard

    Posted 8 days ago

    Hi Priya,

    Can you please clarify what filters you want to reset?

    Visual filters (applied to a specific Visual) or All filters in the Filter top area?



    ------------------------------
    Andrei Istomine
    ------------------------------



  • 4.  RE: Error in making a custom widget for reset filter to be applied in the dashboard

    Posted 50 minutes ago

    Hey Priya! I'm working on a similar reset filter functionality for Cognos dashboards. Would be happy to take a look at your code (HTML/JS and spec.json) and see if I can spot anything causing the upload error.



    ------------------------------
    William Walker
    ------------------------------