Password Verification

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

    1. Problem description

    In the filling template, you often encounter general verification, which may not meet your needs.

    For example, when a user changes his password, he should first enter the original password, which should be verified with the corresponding value (original password) in the database. If it is the same, it will be updated, if it is different, an error will be reported. As shown in the figure below:

    Kapture 2021-01-08 at 15.33.19.gif


    2. Implementation ideas

    Add built-in verification and use formula to verify cells.

    II. Steps

    1. Report design

    As shown in the figure below, add password widgets to cells B2 and B3.

    截屏2021-01-08 下午3.27.54.png


    2. Data entry attribute setting

    In the menu bar, click Template > Data entry attributes to add built-in SQL submission. The database is FRdemo and the table is userinfo. Smart add username and password, and the values are parameter $fine_username and B3, check username as the primary key, as shown in the figure below:

    Note: parameter $fine_ username is used to modify the password, and its specific application can refer to theParameter control of Permission granularity


    3. Data validation settings

    In the menu bar, click Template > Data entery Attributes to add a built-in verification for data validation. As shown in the figure below:

    Validation formula: B2==sql("FRDemo","select * from userinfo where information_username='"+$fine_username+"'",3)

    Validation error information: "Wrong Password,cannot be modified!"

    Note: the meaning of the verification formula is to query the password corresponding to the user name in the userinfo table. For a detailed explanation of the formula, see the SQL function in the document


    Meaning of verification: the data in B2 must be the same as the password of the current user, if not, an error will be reported.

    Note: this example only shows how to check the data in the cell and the data in the database. You can also set other check settings for the cell.


    4. Report Preview

    Mount the template to the decision-making system. The preview method is data entry. For the mounting method, please refer to the document: Decision System Mount Report, log in to the decision-making system with Anna's account, and open the template.

    截屏2021-01-08 下午4.05.38.png

    Anna's password in the userinfo table is 123456.


    When the input old password is not 123456, the data validation prompt: "Wrong Password,cannot be modified!"

    When the old password is 123456, the data verification prompts: verification is successful

    as shown in the figure below:

    205abdd4aaccc776b4f1f3d553b3b1fd.gif

    III. Template download

    Completed template, please refer to %fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\DataEntry\DataEntryAttribute\PassVerify.cpt 

    Click download template: 

    PassVerify.cpt

    Attachment List


    Theme: Rachel
    Already the First
    Already the Last
    • 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