<< Click to Display Table of Contents >> Set Submit |
This chapter introduces the Settings of "data submission" in "data filling"
❖Submission Type
set the submission mode of the current submission. Options include: null, Submit Insert, Submit Update,Submit Delete, Intelligent Submit.
•Insert commit: insert the data and execute the inset statement in the database
•Update submission: update the data and execute the update statement in the database. It is necessary to specify the conditional column in the update submission, which is equivalent to locating the where condition part of the data to be modified in the update statement
•Delete submit: delete the data and execute the delete statement in the database. It is necessary to specify the conditional column in the deletion submission, which is equivalent to locating the where condition part of the data to be deleted in the delete statement
•Intelligent submission: according to the data changes, intelligent judgment to do "add, delete and modify" operation:
A.Scenario 1: the data bound on the form class component is the same as the backfilled target table, and the target table of the database has a primary key (for the primary key, take "Id" as an example), the intelligent submission judgment is as follows:
1. Delete the row data
2. Add the existing ID data, update the ID data, and insert the existing ID data
3. Modify the row data to update
B. Scenario 2: the data bound on the form class component is the same as the backfilled target table, and the database target table has no primary key. The intelligent submission judgment is as follows:
1. Delete the row data
2. Insert the data of the new row
3. Modify the row data to update
C.Scenario 3: the data bound on the form class component is not the same as the backfilled target table, and the database target table has a primary key (for the primary key, take "Id" as an example), the intelligent submission judgment is as follows:
1. Delete the row data
2. Add the existing ID data of the target table and update the ID data; add the existing ID data of the target table and insert the ID data
3. Modify the existing ID data of the target table and update the ID data; modify the existing ID data of the target table and insert the ID data
D.Scenario 4: the data bound on the form class component is not the same as the backfilled target table, and the database target table has no primary key. The intelligent submission judgment is as follows:
1. Delete the row data
2. Insert the data of the new row
3. Modify the existing column data of the target table, update the conditional column data; modify the existing rule column data of the target table, and insert the conditional column data
Notes:
•When the submission type is "null", it means that the submission type is not specified. It has no meaning for the data submission on the toolbar and the type of commit buttion, but it would not effect the submission realized by the use of script.
•When setting columns match, "Intelligent Submit" is only available when the source columns are all from the Form Parameter component or FreesyleForm component.
❖Filling and Submission Method
The submitted method includes the "submit button" component and the "submit action" in the toolbar.
[Submit] button:submit component needs to be added to the dashboard
A. filling and submission:
Settings: toolbar on the right of the submission component [Settings]->[options]->[type] select "fill and submit", and [Parameter] select the filling name to submit, as shown in the figure below:
Submit: click the submit button in view of the report, and the selected fill will be submitted at the same time. The submitted type is the submission type selected in "set fill", and the "submit type" option is referred to above
B. Script Submission:
Preconditions: the right toolbar of the submission component [Settings]->[options]->[type] selects the type "null", and when the median value is "fill submit", the "script" function will not be displayed
Settings: the right toolbar of the submission component [Settings]->[options]->[script], and write the submission script in the "On Commit" of the script pop-up box
The format of the submission script is as follows: submit a single filling, submit multiple filling at the same time and submit multiple filling in turn:
Submit Insert: insert("my_first_form"); Insert (" filled name ,my_first_form"); Or insert (" my_first_form "); Insert (" myFill_db2")
Submit Update: update("my_first_form"); Update (" filled name ,my_first_form"); Or update (" my_first_form "); Update (" myFill_db2 ")
Submit Remove: remove("my_first_form"); Remove (" filled name ,my_first_form"); Or remove (" my_first_form "); Remove (" myFill_db2 ")
Intelligent Submit : autoCommit(" filled name "); AutoCommit (" filled name 1,filled name 2"); Or autoCommit(" filled name 1"); AutoCommit (" filled name 2")
[Commit] button- there is no submit button in the dashboard, but the filling scene is set. "commit" button will appear in the toolbar at the top of the report
Note: there is no submit button in the dashboard, and the "commit" action is configured in the toolbar (configured by default)
When viewing the dashboard, you can see this button in the toolbar, as shown in the figure below: