Dashboard Data Entry

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

    1. Problem description

    Dashboard does not support thedata entry preview in cpt file, so how can the user realize the data entry function of the dashboard?


    2. Solution

    1) Users can add the submit button widget to realize the function of dashboard data entry.

    2) Users can add a web box widget plugin to insert a report to realize the function of dashboard data entry.


    II. Example 1

    By adding the submit button widget, the dashboard data entry is realized

    1. Report design

    Create a new dashboard. The report design is shown in the figure below

    1.png

    The label widget on the left describes the widgets on the right. Modify the widget names and value for the widgetsl on the right. The submit button is at the bottom. The details are as follows:


    Description  Widget type   namevalue    data dictionary
      Name  Text Field  name  if(len($fine_username)=0,"admin",$fine_username)  none
      Type  Drop-down box  type  nonepersonal leave, annual leave, sick leave
      Start time  date  startday  now()  none
      End time  date  endday  now()  none
      Days off  Text Field  day  DATEDIF($startday,$endday,"D")+1  none
      Reason  Text Area  reason  none  none
      Submit  Button  submit  none  none




    2. Mobile terminal style adjustment

    Adjust the width and height of the dashboard, and cancel the App Relayout of the mobile terminal, as shown in the figure below:

    2.png


    3. Commit to Database event

    Select the submit button widget and click event to add a click event

    Add a commit to database event. The table is Absence, and the corresponding values are as follows:

    3.png

    Note: the value is preceded by a $sign, which means that the parameter is referenced.


    4. Setting callback function

    At this time, if the report is successful/failed, there is no prompt.

    Therefore, you need to set a callback function to prompt the user whether the data entry is successful or not. As shown in the figure below:

    4.png

    JS code is as follows:

    if (fr_submitinfo.success) {
    FR.Msg.toast('Submit successfully!');
    } else {
    FR.Msg.toast('Submit failed!');
    }

    Note: success only means that there is no exception in the background program execution, and does not mean that the data is submitted successfully.


    5. Effect preview

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


    5.gif


    III. Example 2

    By adding a web box widget plugin to insert a report, the function of dashboard data entry is realized.

    Note: mobile terminal does not support web box widget

    1. Installing plugin

    Contact technical support to install the webpage box widget plugin: support@fanruan.com or https://fanruanhelp.zendesk.com/hc/en-us


    2. Add webpage box widget

    Select widget > webpage box widget, drag it to the body box of dashboard, as shown in the figure below:

    6.png


    3. Setting address and parameters

    Select the webpage box widget, and click Widget Settings > Attributes > Addressto set the corresponding template (template path or network template), as shown in the figure below:

    7.png

    Note: If you found the template is not able to enter data, you can add & OP = write at the end of the template URL.


    4. Effect preview

    Save the template and select preview. The effect is the same as II.5 becuase we are using the same template.

    Note: mobile terminal does not support


    IV. Completed template

    1. Example 1:

    For completed templates, please refer to:

    %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Data Entry\DEDashboard1.frm

    Click to download the template: DEDashboard1.frm


    2. Example 2:

    For completed templates, please refer to:

    %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Data Entry\DEDashboard2.frm

    Click to download the template: DEDashboard2.frm


    Attachment List


    Theme: Data Entry
    • 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