Successfully!

Error!

Types of Event Responses

  • Last update:  2020-12-14
  • I. Overview 

    1) When an event is triggered, it will cause a corresponding response. The event response methods corresponding to various events have been introduced in FR events . The following describes the event response methods one by one  

    2) There are 5 response methods provided in FR: Javascript script, submission to database, sending email, custom submission and built-in SQL. For custom submission and built-in SQL, please refer to: Report Data Entry Attributes. This article will introduce the use of the other three response methods in detail.  

    II. JavaScript

    The most common response method. When an event occurs, a series of JavaScript scripts are executed, which are usually used for real-time interaction with users, such as timely verification and dynamic assignment.

    1. As shown in the figure below, add a button widget, click [Event], and select the event occurrence time.

    2. The event setting panel appears, select the event response method as [JavaScript].

    3. You can pass in parameters, choose to import external JS or manually write JS scripts.

    Note: The JavaScript event response method is only applicable to widget events, web page events and button custom events. Please refer to FR's JS example for the usage example of JavaScript .

    image.png

    Ⅲ. Submission to database

    As the name implies, submitting to the database is similar to data entry, adding, reducing, and modifying database data, except that the submitting to database operation at this time is performed after operating the widgets or toolbar custom buttons.

    1. As shown in the figure below, select the event response method as [submission to database].

    2. In the same submission to database event, we can set multiple submission operations to meet multiple rules, such as submitting the data to two data tables at the same time.

    3. The submit event of widgets and toolbar custom buttons supports binding multiple submission to database events, which is similar to adding multiple built-in SQL in the report data entry attribute.

    4. The properties of submission to database event are similar to that of data entry attribute, except that there is an additional function to set a callback function. For examples of using the callback function, please see the return value of the widget callback event .   

    Note: submission to database event apply to all events except for the submission event in data entry attribute.

    image (1).png

    Ⅳ. Send Email 

    A reminder method, if the event is triggered, an email is sent to notify the corresponding person in charge.

    Note: You must configure the basic information of the sender, email address, etc. in the platform management before editing the email event, otherwise there will be the following prompt and cannot be edited:

    image (2).png

    1. To configure the mail sender in the management platform , please refer to the mail and mail address book . The sender is set in the Email options, and the recipient is set in the address book. The sender's mailbox must be configured and can only be one mailbox. There is no need to configure the email address of the recipient and you can write the email address directly in the event. 

    2. You can enter multiple recipients, either a specific email address or a user configured in the mail address book. The separator is a comma.

    3. After configuring the basic email information, click Send Email, as shown below:

    4. For an example of sending an email, please see Click the button to send an email . 

    Note: Sending email is only applicable to widget events and button custom events. Sending emails can use the parameters and cells in the template to achieve dynamic recipients, dynamic text, and dynamic headers.

    image (3).png

    Attachment List


    Theme: Secondary Development
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback