Value processing of built-in SQL submission

  • Last update:  2022-01-21
  • I. Overview

    1. Application scenarios

    When designing the data entry template, some data can be skipped and not filled in. It is hoped that these empty data can be saved as 0 when entering the database.

    In other cases, the database table field is not a bound cell, but you want to directly store the parameter value, date, current time, etc. So how to achieve it?


    2. Implementation ideas

    When setting the built-in SQL submission, the value corresponding to the column does not have to use cells, but can also use data in other formats. There are nine kinds of data, as shown in the figure below:

    Kapture 2021-01-11 at 15.28.57.gif


    II. Examples

    1. Data preparation

    Create a new general report and a new database query dataset. The SQL statement is: select * from ordersdetail



    2. Design report

    Design the data entry report, and add Text Widgets to cells A3-D3, as shown in the figure below:

    截屏2021-01-11 下午3.55.44.png


    3. Setting data entry attributes

    New built-in SQL submit, ID is bound to cells, and other fields are bound to formulas.

    Take the productID as an example, and its value is the formula: if (len (B3) = = 0, 0, B3), which means that if the cell is empty, 0 will be entered into the database; if not, cell data will be entered.


    Other fields are set in the same way. You only need to change the next cell, as shown in the figure below


    4. Effect preview

    1) PC terminal

    Save the template and click Date Entry Preview to add a new record, as shown in the figure below:

    After successful submission, the warehousing data is as follows:


    2) Mobile terminal

    It supports both App and H5 previews, the effect is as shown below:

    11.png

    III. Template download

    Completed template, please refer to 

    %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\DataEntry\DataEntryApplication\valueProcess.cpt

    Click download template:

    valueProcess.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