Version
Version | Functional Change |
---|---|
11.0.1 | Added the collapse, expand, and submit APIs. |
11.0 | Difference from V10.0: Added the getParameterContainer() API in V11.0, which can be used to obtain the widgets on the parameter panel after obtaining the parameter panel. |

Before API use, read JS API Compatibility Description carefully. APIs are supported in both general reports and dashboards (new version) by default.
getWidgetByName
API | getWidgetByName(name) | To obtain the widget on the parameter panel. The obtained widget needs to be used with widget-related APIs. |
---|---|---|
Parameter | name: string | Widget name, which is a string. |
Returned Value | object | Widget object, which needs to be used with the widget attributes /APIs. |
Example | Example 1: You can obtain the drop-down box widget comboBox0 on the parameter panel defined as parameterContainer. parameterContainer.getWidgetByName("comboBox0"); Example 2: You can obtain the drop-down box widget named comboBox0 on the parameter panel. _g().getParameterContainer().getWidgetByName("text0"); | |
Application Example | After obtaining the widgets on the parameter panel, you can assign a value to one widget based on the value of another widget to enable linkage between the widget values. For details, you can download the template Obtaining the Widget on the Parameter Panel.cpt
| |
Mobile Terminal | This API is supported on mobile terminals. |
collapse
API | collapse() | To collapse the parameter panel. |
---|---|---|
Parameter | - | - |
Returned Value | void | |
Example | Example 1: You can collapse the obtained parameter panel defined as parameterContainer. parameterContainer.collapse(); Example 2: You can collapse the obtained parameter panel. _g().getParameterContainer().collapse(); | |
Application Example | You can click the button on the toolbar to collapse the parameter panel. For details, you can download the template Collapsing and Expanding the Parameter Panel with Custom Buttons on the Toolbar.cpt | |
Mobile Terminal | This API is supported on mobile terminals. |
expand
API | expand() | To expand the parameter panel. |
---|---|---|
Parameter | - | - |
Returned Value | void | |
Example | Example 1: You can expand the obtained parameter panel defined as parameterContainer. parameterContainer.expand(); Example 2: You can expand the obtained parameter panel. _g().getParameterContainer().expand(); | |
Application Example | You can click the button on the toolbar to expand the parameter panel. For details, you can download the template Collapsing and Expanding the Parameter Panel with Custom Buttons on the Toolbar.cpt | |
Mobile Terminal | This API is supported on mobile terminals. |
submit
API | submit() | To automatically submit the values of widgets on the parameter panel and trigger a report query. |
---|---|---|
Parameter | - | - |
Returned Value | void | |
Example | Example 1: You can query the report after the values of widgets on the obtained parameter panel, defined as parameterContainer, are submitted automatically. parameterContainer.submit(); Example 2: You can query the report after the values of widgets on the parameter panel are submitted automatically. _g().getParameterContainer().submit(); | |
Application Example | You can query the report after selecting a value in the drop-down box widget without clicking the query button, as shown in the following figure. For details, you can download the template Automatic Query After Submission.cpt | |
Mobile Terminal | This API is supported on mobile terminals. |