A method for reassigning fields after form data is submitted to the system

By configuring the submission recalculation settings and back-end process engine processing, the front-end is solved by the browser-affected front-end and the failure of hidden field assignment when submitting form data, and the stable assignment of form fields is achieved.

CN114398577BActive Publication Date: 2025-08-12SHANGHAI EASY SCHOOL INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111527481.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2025-08-12
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

When submitting form data, the front-end is easily calculated due to the influence of the browser, and the front-end of the approval node hidden fields cannot perform formula or data association calculation, resulting in the assignment failure.

Method used

By configuring the commit recalculation settings, the process engine detects and performs rule separation on the backend, calls the formula engine or filter engine for field processing, ensuring that the assignment is not affected by the browser environment and solving the automatic assignment of hidden fields.

Benefits of technology

The form field assignment is implemented without being affected by the browser environment, ensuring that the hidden fields of the approval node can be assigned correctly, and avoiding data submission failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398577B_ABST
    Figure CN114398577B_ABST
Patent Text Reader

Abstract

The present invention provides a method for reassigning fields after form data is submitted to a system, characterized in that it includes the following steps: S1: configuring submission recalculation settings; S2: submitting form data; S3: a process engine detecting whether the form data needs to trigger submission recalculation; S4: if no triggering is required, directly passing the form data; otherwise, performing rule separation according to the submission recalculation configuration; S5: calling different engines to process the form data according to different triggering rules of the form data; S6: the process engine checking according to the submission recalculation settings and determining whether to pass the processed form data. The beneficial effect of the present invention is that by setting submission recalculation rules by the front-end form engine and executing the submission recalculation rules by the back-end process engine, the form field assignment can be achieved without being affected by the browser environment and the problem of hidden fields in the approval node being unable to be automatically assigned can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of web page front-end development, and in particular to a method for reassigning fields after form data is submitted to a system. Background Art

[0002] Form data generally consists of many fields, and the values of form fields are calculated in the following ways:

[0003] The first one is to assign values directly when submitting data.

[0004] Second, the default value is a formula, which is calculated based on other fields.

[0005] The third type, the default value, is data association, which is obtained by filtering data from other applications through data association rules.

[0006] However, when submitting data, if all field values are calculated by front-end formulas and data associations, the following problems may arise:

[0007] The front-end is easily affected by the browser and calculation failures; for fields hidden in the approval node, the front-end cannot perform formula or data association calculations. Summary of the Invention

[0008] In order to solve the above technical problems, the present invention discloses a method for reassigning fields after form data is submitted to the system. The technical solution of the present invention is implemented as follows:

[0009] A method for reassigning fields after form data is submitted to a system, comprising the following steps:

[0010] S1, configure submission recalculation settings;

[0011] S2, submit form data;

[0012] S3, the process engine detects whether the form data needs to trigger submission and recalculation;

[0013] S4: If no trigger is required, the form data is passed directly; otherwise, the rules are separated according to the configuration of the submitted recalculation;

[0014] S5: Call different engines to process the form data fields according to the triggering rules of the form data;

[0015] S6, the process engine recalculates the settings based on the submission and determines whether to pass the processed form data.

[0016] Preferably, the S1 step includes:

[0017] S1.1. When saving a form, the form engine generates JSON data corresponding to the entire form. This data includes information such as the name, type, trigger formula, and data association configuration of each field. Each field configuration is a sub-JSON field in the larger JSON data corresponding to the entire form. Based on user input, the form engine sets field trigger formula calculations or data association rules, placing them in an array of QuestionRelation objects. Each formula or association rule constructs a QuestionRelation object; the formula calculation is stored in the string type attribute queFormula of QuestionRelation, and the data association rule is stored in the JSON type attribute queMatchAttr of QuestionRelation.

[0018] S1.2, the front-end sets the order in which these fields are recalculated: the form engine parses the user input and sorts the QuestionRelations object array mentioned in S1.1 according to the user's selection. The order of QuestionRelations is the order in which the process engine triggers formula calculations or data associations;

[0019] S1.3, the front end sets the validation conditions that the value of this field must meet; if the field does not meet the validation conditions, the data will be rejected; the validation conditions are saved as formula calculations in string variables, and multiple validation conditions form a validation condition list QuestionLegalRuleList, which is passed to the back end by the front end.

[0020] In S1.4, after the frontend sets up the form's JSON data to be passed to the backend, it passes the JSON data to the backend via an HTTP POST request. The backend parses the bytes contained in the HTTP request, converts them into the form's JSON object, and stores the QuestionRelation object array and QuestionLegalRuleList list in the object in the MySQL database's question_relation and question_legal_rule_list tables, respectively.

[0021] Preferably, the step S5 includes a formula engine and a screening engine.

[0022] Preferably, in the step S5, when a field of the form data triggers formula calculation, the formula engine calculates the default value of the field; when a field of the form data triggers an association rule, the screening engine screens data that meets the conditions from other databases and fills the field.

[0023] Preferably, in step S6, the process engine pulls the list of check conditions in S1.3 and calls the formula engine to calculate in sequence whether each check condition formula is true; if true, the form data is passed; otherwise, if false, the form data is rejected.

[0024] The implementation of the technical solution of the present invention can solve the technical problems in the prior art that the front end is easily affected by the browser in field assignment and calculation failures; for fields hidden in the approval node, the front end cannot perform formula or data association calculations; the implementation of the technical solution of the present invention, by setting submission recalculation rules through the front-end form engine and the back-end process engine executing the submission recalculation rules, can achieve the technical effect that the form field assignment is not affected by the browser environment and solves the problem that hidden fields in the approval node cannot be automatically assigned. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only one embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0026] Identical components are denoted by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the accompanying drawings, and the terms "bottom," "top," "inner," and "outer" refer to directions toward or away from the geometric center of a particular component, respectively.

[0027] Figure 1 Schematic diagram of the process of the embodiment. DETAILED DESCRIPTION

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0029] Example

[0030] In a specific embodiment, Figure 1 As shown, a method for reassigning fields after form data is submitted to the system includes the following steps:

[0031] S1, configure submission recalculation settings;

[0032] S1.1. When saving a form, the form engine generates JSON data corresponding to the entire form. This data includes information such as the name, type, trigger formula, and data association configuration of each field. Each field configuration is a sub-JSON field in the larger JSON data corresponding to the entire form. Based on user input, the form engine sets field trigger formula calculations or data association rules, placing them in an array of QuestionRelation objects. Each formula or association rule constructs a QuestionRelation object; the formula calculation is stored in the string type attribute queFormula of QuestionRelation, and the data association rule is stored in the JSON type attribute queMatchAttr of QuestionRelation.

[0033] S1.2, the front-end sets the order in which these fields are recalculated: the form engine parses the user input and sorts the QuestionRelations object array mentioned in S1.1 according to the user's selection. The order of QuestionRelations is the order in which the process engine triggers formula calculations or data associations;

[0034] S1.3, the front end sets the validation conditions that the value of this field must meet; if the field does not meet the validation conditions, the data will be rejected; the validation conditions are saved as formula calculations in string variables, and multiple validation conditions form a validation condition list QuestionLegalRuleList, which is passed to the back end by the front end.

[0035] In S1.4, after the frontend sets up the form's JSON data to be passed to the backend, it passes the JSON data to the backend via an HTTP POST request. The backend parses the bytes contained in the HTTP request, converts them into the form's JSON object, and stores the QuestionRelation object array and QuestionLegalRuleList list in the object in the MySQL database's question_relation and question_legal_rule_list tables, respectively.

[0036] S2, submit form data;

[0037] S3, the process engine detects whether the form data needs to trigger submission and recalculation;

[0038] S4: If no trigger is required, the form data is passed directly; otherwise, the rules are separated according to the configuration of the submitted recalculation;

[0039] S5: Call different engines to process the form data fields according to the triggering rules of the form data;

[0040] This step involves the formula engine and the filter engine. When a form data field triggers a formula calculation, the formula engine calculates the field's default value. When a form data field triggers an association rule, the filter engine filters matching data from other databases and populates the field.

[0041] S6, the process engine recalculates the settings based on the submission and determines whether to pass the processed form data.

[0042] The process engine pulls the list of check conditions in S1.3 and calls the formula engine to calculate whether each check condition formula is true in sequence; if it is true, the form data is passed; otherwise, if it is false, the form data is rejected.

[0043] In this embodiment:

[0044] User configuration form submission recalculation settings:

[0045] Indicates that certain fields are obtained by applying formula calculations to other fields, or that certain fields are obtained by filtering data from other databases using the values of other fields as filtering conditions. The formula is stored in a string variable, and the data association rules are stored in a JSON object. The front-end will add the formula string and the association rule JSON to a list and pass it to the back-end. At the same time, the order in which the values of these fields are recalculated will be set, that is, the above list will be sorted. Finally, the validation conditions that these fields must meet are set. If the fields do not meet the validation conditions, the data will be rejected. The validation conditions are also stored as formulas in string variables. Multiple validation conditions form a list of validation conditions and are passed to the back-end by the front-end.

[0046] When the user submits data manually, the process engine detects whether the form is configured for recalculation upon submission; if recalculation is not configured, the data is passed directly.

[0047] The process engine detects the existence of a submission recalculation configuration and separates and processes the rules according to the triggering rules of the submission recalculation.

[0048] For fields with a default value of "Calculated by formula," the formula engine is called to calculate the field's default value. For fields with a default value of "Data Association," the filter engine is called to filter matching data from other databases and then populate the field. These calculations are performed in the order configured.

[0049] After the calculation is completed, the process engine pulls the list of saved verification conditions and calls the formula engine to calculate whether each verification condition formula is true in sequence; if a false result is encountered, the data submission is rejected.

[0050] The advantages of the present invention are as follows:

[0051] Avoid the front-end program running in the browser from being interfered with by factors such as the browser's operating environment, failing to trigger the formula or data query task (data association) that should be calculated, resulting in some fields of the form not being assigned reasonable values.

[0052] Certain sensitive fields requiring high permissions also need to be retrieved through formula calculations or data query tasks (data association). However, due to permission issues, these fields cannot be directly returned to the browser frontend, so the frontend cannot trigger the corresponding formula calculations or query tasks. The process engine can trigger the recalculation on the backend server based on the submitted configuration, which not only meets business needs but also prevents the leakage of sensitive information.

[0053] It should be pointed out that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for reassigning fields after form data is submitted to a system, characterized in that: The steps are as follows: S1, configure submission recalculation settings; S1.

1. When saving a form, the form engine generates JSON data corresponding to the entire form. This data includes information about each field. Based on user input, the form engine sets the field to trigger formula calculations or data association rules, and places them in an array of QuestionRelation objects. Each formula or association rule constructs a QuestionRelation object. The formula calculation is saved in the string type attribute queFormula of QuestionRelation, and the data association rule is saved in the json type attribute queMatchAttr of QuestionRelation; S1.2, the front-end sets the order in which the above fields are recalculated: the form engine parses the user input and sorts the QuestionRelations object array in S1.1 according to the user's selection. The order of QuestionRelations is the order in which the process engine triggers formula calculation or data association. S1.3, the front end sets the verification conditions that the values of the above fields must meet; If a field does not meet the validation criteria, the data will be rejected. The validation criteria are stored as formulas in string variables. Multiple validation criteria form a validation criteria list, QuestionLegalRuleList, which is passed from the front-end to the back-end. S1.

4. After the front-end sets the form JSON data to be passed to the back-end program, it passes the JSON data to the back-end through an HTTP POST request. The back-end parses the byte information contained in the HTTP request, converts it into the form JSON object, and stores the QuestionRelation object array and QuestionLegalRuleList list in the JSON object into the question_relation table and question_legal_rule_list table in the MySQL database respectively. S2, submit form data; S3, the process engine detects whether the form data needs to trigger submission and recalculation; S4, if no trigger is needed, pass the form data directly; Otherwise, rule separation is performed based on the configuration submitted for recalculation; S5: Call different engines to process the form data fields according to the triggering rules of the form data; S6, the process engine recalculates the settings based on the submission and determines whether to pass the processed form data; The system is a business process automation system BPM.

2. A method for reassigning fields after form data is submitted to a system according to claim 1, characterized in that: In the step S1.1, the field information in the data includes the name, type, trigger formula and data association configuration of each field.

3. A method for reassigning fields after form data is submitted to a system according to claim 2, characterized in that: In the step S1.1, the configuration of each field is a sub-JSON field in the large JSON data corresponding to the entire form.

4. A method for reassigning fields after form data is submitted to a system according to claim 3, characterized in that: The step S5 includes a formula engine and a screening engine.

5. A method for reassigning fields after form data is submitted to a system according to claim 4, characterized in that: In step S5, when a field in the form data triggers formula calculation, the formula engine calculates the default value of the field; When a field in the form data triggers an association rule, the filtering engine filters the data that meets the conditions from other databases and fills the field.

6. A method for reassigning fields after form data is submitted to a system according to claim 5, characterized in that: In step S6, the process engine pulls the list of verification conditions in S1.3 and calls the formula engine to calculate whether each verification condition formula is true in sequence; if it is true, the form data is passed; otherwise, if it is false, the form data is rejected.

Citation Information

Patent Citations

  • Method for automatically checking acquired data

    CN112015728A