Value Processing for Built-in SQL Submissions

  • Last update:July 07, 2025
  • Overview

    Application Scenario

    When designing data entry templates, you may want to save some of the data (which can be left unfilled) as zeros in the database.

    Additionally, when the fields in the database table are not bound to cells, you may want to submit the data, such as parameter values, dates, and the current time, into the database directly. How to realize the effect?

    Implementation Method

    When setting a built-in SQL submission, you do not have to use the values for the corresponding columns in the format of Cell. You can use data in other formats, with a total of nine options available, as shown in the following figure.

    Example

    Data Preparation

    Create a general report, and create a database query dataset with the SQL statement SELECT * FROM Sales.

    Report Design

    Design the data entry table, and add text widgets for cells A3 to F3, respectively, as shown in the following figure.

    Setting the Data Entry Attribute

    To create a built-in SQL submission, click +, select Built-in SQL, bind the fields ID and Region to the corresponding cells, and bind other fields to formulas.

    Taking the Sales_volume field as an example, set the value of the field to the formula if(len(C3)==0,0,C3). In this case, zero will be submitted into the database when the cell is empty. Otherwise, the cell data is submitted.

    Similarly, set the values of other fields to formulas with the cells in the formulas modified, as shown in the following figure.

    Effect Display

    1. PC

    Save the template, click Data Entry Preview, and add a record, as shown in the following figure.

    After you submit the data successfully, the following figure shows the data submitted to the database.

    2. Mobile Terminal

    The report can be previewed on the DataAnalyst app and the H5 terminal. The following figure shows the effect.

    Template Download

    For details, you can download the template Value Processing for Built-in Submissions.cpt.

    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