Successfully!

Error!

Built-in Validation

  • Last update:  2024-03-27
  • Overview

    Version Description

    Report Server Version
    JAR Package VersionFunctional Change

    10.0.9

    2020-08-31

    Modified Validation Error on the built-in validation edit page to Prompt If Validation Formula Is Unsatisfied.


    Application Scenario

    You can define validation formulas and error messages. Each sheet is validated based on its setting during data validation after data entry or direct submission. If data does not meet the validation formula, the submission will be terminated and an error message will pop up, as shown in the following figure.

     7.gif

    Function Entry

    Choose Template (on the designer menu bar) > Data Entry Attribute, click Validate Data, click the + icon on the left, select Built-in Validation from the drop-down list, click the + icon on the right to add Validation Formula and Prompt if Validation Formula Is Unsatisfied, and click OK, as shown in the following figure.

     2.png

    Example

    Data Preparation

    1. Create a database query dataset named ds1 and enter the SQL statement SELECT * FROM Sales.

     3.png

    Table Design

    Drag dataset fields into the corresponding cells and add text widgets to cells from cell A2 to cell F2, as shown in the following figure.

     4.png

    Submission Setting

    Choose Template > Data Entry Attribute, click Submit, and add a built-in SQL submission, as shown in the following figure.

     5.png

    Data Validation Setting

    Choose Template > Data Entry Attribute, click Validate Data, and add a built-in validation, as shown in the following figure.

     6.png

    Set Validation Formula to D2>0&&D2<10000, which indicates that the value of the sales cost during data entry must range from 0 to 10000.

    Set Prompt if Validation Formula Is Unsatisfied to "The sales cost exceeds the range!".

    iconNote:
    If cells in the validation formula are expanded, the formula will be effective for all expanded cells. If cells in the validation formula are non-expanded, the formula will only be effective for the single defined cell.

    Effect Display

    On PC

    Save the report and click Data Entry Preview. Enter a value beyond the validation range in Cost and click Data Validation or Submit. You can see that an error message pops up, as shown in the following figure.

     7.gif

    On Mobile Terminals

    The function is also supported on mobile terminals, as shown in the following figure.

     8.png

     

    Template Download

     

    You can download the template Built-in Validation.cpt.

    Notes

    If an error message displaying "Fine-Engine_Verify_Formular_Parser_Error" pops up during the validation, the formula may be executed abnormally.

    The most common cause is the incorrect parameter type in the formula. For example, you have set the formula =inarray(1,A1)>0. In this case, if only one record of data exists in cell A1, this record of data will be parsed as a string. However, the second parameter in the in_array function must be an array, leading to an error.

    You can modify the formula into =inarray(1,split(A1,","))>0 to ensure compatibility in different situations.

    9.png

    Attachment List


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

    Doc Feedback