Successfully!

Error!

Data Entry Submission Condition

  • Last update:  2024-03-28
  • Overview

    Application Scenario

    Submission conditions can be used to filter data submitted for storage. Only data that meets the submission conditions can be stored.

    For example, you may want to filter data with empty unit prices (namely invalid data) when storing product data. In this case, you can set a submission condition demanding that the unit price cells cannot be empty, as shown in the following figure.

     1.png

    After data entry data is submitted in the frontend, data with empty unit prices is not recorded to the database, as shown in the following figure.

     2.png

    iconNote:
    Different from the data validation, submission conditions only filter unsatisfied data during submission and do not terminate the submission process.

    Function Entry

    Choose Template (on the designer menu bar) > Data Entry Attribute and click Set Submission Condition in the lower right corner of the Built-in SQL setting page. The condition setting page pops up, as shown in the following figure.

     3.png

    The following figure shows the condition setting page. You can set Common Condition or Formula Condition.

    • Common Condition: You can set submission conditions based on dataset columns (namely data columns in the data table selected for submission and storage). After you set conditions, if to-be-stored data does not meet the storage conditions of this column, the data will not be stored. For details about data column attributes, see Data Column Attributes.

    • Formula Condition: You need to perform operations on data column data or cell data before setting conditions through formulas.

     4.png

    Example

    Template Preparation

    Open the built-in template of the designer in the path %FR_HOME%\webroot\WEB-INF\reportlets\doc-EN\DataEntry\DataEntryAttribute\DE_BuiltinDup.cpt.

    Modify the original template by removing all fields in the data entry cells. The following figure shows the final data entry template.

     5.png

    Submission Condition Setting

    Open the condition setting page and add a formula condition len(F2)!=0, as shown in the following figure.

    iconNote:
    The formula means that data with empty unit prices cannot be stored.

     6.png

    Effect Display

    Save the report and click Data Entry Preview. Add three records with the unit price of the second record as empty, as shown in the following figure.

     7.png

    Click Submit and view data in the database table. The second record is not stored while the other two records are stored successfully, as shown in the following figure.

     8.png

    iconNote:
    Data entry submission conditions are also supported on mobile terminals.

    Template Download

     

    You can download the template Submission Condition Example.cpt.


    Attachment List


    Theme: Data Entry
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback