Actual Value and Diaplay Value

  • Last update:  2021-05-27
  • I. Description

    In our usual use of widgets, we cannot avoid the need to reference the value of the widget. When referring to the value of the widget, the actual value and display value of the widget will be involved. Now we specifically divide which widgets have actual values and display values, and use of widget values!

    II. Widget(Value) Comparison

      WidgetActual Value  Display Value    Whether the actual value display value is consistent
    Text Widget  --   --  Yes
    Area Widget  --   --  Yes
    Number Widget  --   --  Yes
    Password Widget  --   --  Yes
    Button Widget  --   --  Yes
    Checkbox Widget  --   --  Yes
    Radio Button Group Widget  Yes  Yes  No
    Checkbox Group Widget  Yes  Yes  No
    Drop-down Box Widget  Yes  Yes  No
    Drop-down Checkbox Widget  Yes  Yes  No
    Date Widget  --  --  Yes
    File Widget  --  --  Yes
    List Widget  Yes  Yes  No
    Web Frame  --  --  Yes
    Drop-down Tree  Yes  Yes  No
    View Tree  Yes  Yes  No

    Note: For widgets such as Text, there is no difference between the actual value and the display value, but for the Drop-down Box, which can set a data dictionary to define the actual value and the display value, it is different.

    III. Example-One

    Let's first demonstrate the method of obtaining the display value and the actual value of the widget and the difference in use!

    Process: New in the parameter pane: Drop-down Box Widget(t1), Radio Button Group Widget(t2), Checkbox Widget(t3), Drop-down Checkbox Widget(t4), Text Widget(t5) and Query button (submit)

    Note: The above widgets are all independent and there is no linkage!


    3.1 Drop-down Box Widget(t1)

    1)Select the t1 button to set the dictionary:

    1.png

    2)Set the click event in the Query button, as follows:

    2.png

    JavaScript code:

    var Widget1 = this.options.form.getWidgetByName("t1"); //To obtain the widget in the parameter interface, first obtain the decision report, and then obtain the widget by the widget name 
    var value_1 = Widget1.getValue(); //Get the actual value of the widget 
    alert('My actual value is:' + value_1); //Actual value of pop-up widget 
    var text_1 = Widget1.getText(); //Get the display value of the widget 
    alert('My diaplay value is:' + text_1); //Display value of pop-up widget

    3)Effect preview: (the actual value is different from the display value)

    3.gif

    The same setting: Radio Button Group Widget(t2), Checkbox Widget(t3), Drop-down Checkbox Widget(t4). 

    Get the same result: The actual value is different from the display value.


    3.2 Text Widget(t5)

    The Text Widget is different, its result shows: the actual value and the display value are the same.

    4.gif

    Summary: At present, in addition to the Drop-down Box Widget, Radio Button Group Widget, Checkbox Widget, Drop-down Checkbox Widget, List Widget, Drop-down Tree, View Tree, these kinds of widgets can set the data dictionary to define the actual value and display value [ Except that the actual value and the display value are different], the actual and display values of other widgets are the same!

    For details, please refer to the Widget(Value) Comparison above.

    IV. Example-Two

    If you get the value of a widget in a cell, what you get is the display value or the actual value of the widget!

    Process: We get the values of parameter widgets t1, t2, t3, t4, t5 in cells B3, C3, D3, E3, and F3 of the report, respectively!

    1) Setting method:

    5.png

    2)Effect preview:

    6.gif

    Summary: The widget of the parameter interface is passed to the background or directly obtained in the cell, which is the [actual value] of the widget.

    V. Example-Three:Actual Value Display Value is Many to One

    As shown above, there is usually a one-to-one correspondence between the actual value and the display value. However, there are cases where different actual values correspond to the same display value. For example, the company name can be the same but the ID is unique, and the ID and the name form a many-to-one relationship.

    10.0 The processing logic of the unified widget when multiple actual values correspond to the same display value:

    1) When selecting a value directly in the widget, whether it is a parameter query or a new report, the actual value and the display are many-to-one, that is, the corresponding actual value is obtained from the selected display value.

    2) When assigning a widget value by passing parameters, if the passed parameter is the actual value, it is consistent with the logic of selecting the value directly in the widget; if the passed value is a display value, the widget selects the first display value by default.

    An example is given below.


    5.1 Parameter Query

    As shown in the figure, add an embedded dataset:

    7.png

    Add Drop-down Box, Drop-down Checkbox, Radio Button Group, Check Button Group, View Tree and Query button in the parameter setting interface, as shown in the following figure:

    8.png

    Note that when adding controls, modify the names of the wigets in order, here in order: a, b, c, d, e.

    Take the Drop-down Box widget for example:

    9.png

    The rest of the widgets will not be explained much. The widget whose name has been modified is as shown in the figure below:

    10.png

    Note: formSubmit0 is the query button widget.

    Then add data dictionary settings to each widget.

    Let's take an example of the Drop-down Box widget, as shown in the figure below: the type of the data dictionary is set to Data Query; the actual value is: ID; the display value is: Name.

    11.png

    The Drop-down Checkbox, Radio Button Group, and Check Button Group are all set as the Drop-down Box in the figure above.

    The View Tree is slightly different:

    1) Please check [Multiselect] first;

    2) Set up the data dictionary: select the construction method [Fast Layered Build]; select the newly built emedded dataset for the data set; select [ID] for the actual value; select [Name] for the display value. As shown below:

    12.png

    The parameter interface setting is completed, and then set the report body as shown in the figure:

    13.png

    Insert formulas into cells A2-E2 respectively, and enter the corresponding [$widget name].

    The preview effect is as follows:

    When the actual value display value is many to one, the different actual value can still be accurately obtained by selecting the same display value(Here you can think of Maria as Tom).

    14.gif

    In addition, for widgets that can manually enter values (such as Drop-down Checkbox), if multiple identical display values are manually entered, only the first display value will be selected in the same widget as passing parameters, as shown in the following figure:

    15.gif


    5.2 New Data Entry Preview

    The Drop-down Box, Drop-down Checkbox, Radio Button, Checkbox Group and View Tree widget all display the display value before and after editing, as shown in the following figure:

    16.gif

    Note: The display value will be displayed during editing in the preview of the data entry, and the actual value will be displayed after the end. The shape setting of the cell must be used to achieve the same effect as the new data entry. For details, please refer to Drop-down Box to Display Actual Value after Data Entry.


    5.3 Transfer Parameters to Assign Widget Values

    As explained above: When assigning a widget value by passing parameters, if the passed parameter is the actual value, it is consistent with the logic of selecting the value directly in the widget; if the displayed value is passed, the widget selects the first display by default value.

    We still need to use the parameter query report created in 5.1 just now.

    Then create a new report, and design the main body of the report as shown in the figure below:

    17.png

    Then add a hyperlink to the A1-F1 cell to the parameter query report used in 5.1, as shown in the figure below:

    18.png

    The settings of A1-E1 to add hyperlinks are as shown in the figure above, there is no difference. 

    Note: After setting the A1 cell hyperlink, you can directly copy A1 cell to B1-F1, and then modify the cell content to "2-5, Maria".

    Save the template and preview it. The preview effect is as follows:

    19.gif

    VI. Templates Download

    Attachment List


    Theme: Parameter
    Already the First
    Already the Last
    • 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