Exclusive API for Drop-down Box Widget

  • Last update:April 10, 2025
  • Version

    VersionFunctional Change
    11.0

    Difference from V10.0:

    Added the setName4Empty API.

      

    iconNote: 
    The following API cannot be used in the FVS visualization dashboard.

    Before API use, read JS API Compatibility Description carefully. APIs are supported in both general reports and dashboards (new version) by default.

    setName4Empty

    API    setName4Empty(name)

    To modify the default text Select None in the drop-down list of the drop-down box widget.

     
    Parameter  name: stringNew text, which is a string.
    Returned Value  void
       Example 

    Example 1: You can modify the default text in the widget drop-down list to Select All when the obtained drop-down box widget object is defined as combo.

    combo.setName4Empty("Select All");

    Example 2: In a general report, you can modify the default text in the drop-down list of the drop-down box widget named comboBox0 on the parameter panel to Select All.

    _g().getParameterContainer().getWidgetByName("comboBox0").setName4Empty("Select All");

    Example 3: In a dashboard, you can modify the default text in the drop-down list of the drop-down box widget named comboBox0 in body to Select All.

     _g().getWidgetByName("comboBox0").setName4Empty("Select All");

    iconNote: 
    If an error occurs due to incomplete creation of the report block object after adding the event, you can add a delay function to postpone the execution.

    setTimeout(function(){    _g().getParameterContainer().getWidgetByName("comboBox0").setName4Empty("Select All");}, 500);


    Application Example 

    You can modify the default text in the drop-down list of the drop-down box widget to Select All.

    1.png

    For details, you can download the template Modifying the Default Text in the Widget Drop-down List.cpt


    Mobile Terminal This API is not supported on mobile terminals.


    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy