Set default values for checkbox button and checkbox button group widgets

  • Last update:  2021-10-03
  • I. Overview

    When adding "checkbox widget" and "checkbox group widget" in the parameter or data entry interface, the default is not selected. If you want to become the default selected, or the "checkbox group widget" has multiple selected by default, this How to achieve it?

    The following describes the specific setting methods and effects of the default values of "checkbox widget" and "checkbox group widget" in the parameter interface and data entry interface.


    II. The default value setting of the check button 

    1. Data entry interface 

    Select the cell, click "Widget Setting" on the right side of the interface, add "checkbox widget", then enter the text "true" in the corresponding cell, click "Data Entry Preview", the check button is selected by default, and the effect is shown in the figure below :


    2. Parameter interface 

    After adding "checkbox widget" in the parameter interface, check "true" under the widget value "Boolean". Click "Pagination Preview", and the "CheckBox Button" is selected by default.


    III. The default value setting of the checkbox button group 

    1. Data entry interface 

    Select the cell, click "Widget Setting" on the right side of the interface, and add "Checkbox Group".

    Set the "Data Dictionary" of the widget to "Database Table", select FRDemo for the database, select STScore for the table, and the actual value and display value are the columns of the class CLASSNO. The checkbox button group has four options: Class1, Class2, Class3, and Class4 during preview.

    The return value types of the "Checkbox Button Group Widget" are divided into arrays and strings. The default value settings of the two types of return values are different. The following describes their specific operations.

    1) The return value type is a string

    Select the widget, set "Widget Setting> Attribute> Advanced> Return Value Type" to "String", select the Delimiter to "Comma", the Initializer to "Single quotation mark", and the Terminator to "Single quotation mark". As shown below:

    That is, when the "checkbox button group" selects a single such as Class1, the returned result is "Class1"; when multiple such as Class1 and Class2 are selected, the returned result is "Class1, Class2".

    When a value is selected by default, write a default value "'Class1'" in the cell; when multiple values are selected by default, write multiple default values "'Class2, Class3, Class4'" in the cell, click "Data Entry Preview", the effect is shown in the figure below:

    2) The return value type is an array

    Select the widget and set "Widget Setting>Attribute>Advanced>Return Value Type" to "Array":

    When a value is selected by default, write a default value "Class1" in the cell. When multiple values are selected by default, write multiple default values "Class2, Class3, Class4" in the cell , and click "Data Entry Preview" ,Results as shown below: 


    2. Parameter interface 

    Similar to the data entry interface, the return value type of the checkbox button group in the parameter interface also has two types, string and array.

    The setting process is basically the same as the data entry interface, add "checkbox button group widget" on the parameter panel, set the widget's "Data Dictionary" to "Database Table", select FRDemo for the database, select STScore for the table, and the actual value and display value are both The column where CLASSNO is located. The steps are shown in the figure below:

    1) The return value type is a string

    Select the widget, set "Widget Setting> Attributes> Advanced> Return Value Type" to "String", select the separator to "Comma", the start character to "Single quotation mark", and the end character to "Single quotation mark". As shown below:

    When a value is selected by default, the string "'Class4'" can be entered in the "Widget Value", and when multiple values are selected by default, the string "'Class1, Class2, Class3'" can be entered in the widget value. Results as shown below:


    2) The return value type is an array

    Select the widget and set "Widget Setting> Attributes> Advanced> Return Value Type" to "Array". When a value is selected by default, the string "Class1" can be entered in the "Widget Value", and when multiple values are selected by default, the string "Class2, Class3, Class4" can be entered in the widget value. Results as shown below:

    Note: The default value must be the actual value.


    IV. Template download

    Attachment List


    Theme: Parameter
    • Helpful
    • Not helpful
    • Only read

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

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

    不再提示

    10s後關閉

    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