fill Form Example

vividime-Club Show all floors Published on 2024-12-10 16:03:52 |Reading mode print Previous Topic Next Topic
1
Unresolved

fill Form Example

722 1
How to fill Form Example?
reply

Using props report

Exciting comments1

vividime-Club Show all floors Published on 2024-12-10 16:04:50
1.Establish a mapping relationship through the form column
As shown in the figure, after the form dashboard is made, click [Form> Form Mapping] on the menu at the top of the editing and form dashboard page to add the  mapping relationship.
Add: add a mapping relationship, a form dashboard supports the addition of multiple mapping relationships.
Delete: delete the mapping relationship.
Rename the form relationship: double-click the mapping  relationship name to edit.
Connection: the drop-down box option is an established data source connection in the [Crates Connection] module. Support the data source reference data form for backfill data.
Table: after selecting the data source, the database and tables of the selected data source are automatically listed. After loading the table, you can search the table under the data source. For details, please refer to the connection section.
Auto match field group: after selecting the data source and the target table, click the auto match field group button to automatically match the bound fields on the component with the columns in the selected target table. If there are multiple components in the form table, select the corresponding components in the pop-up component drop-down list and then automatically match the field. After the field match, all the fields of the form component are added to the source field column, and the target table field is matched to the form component field and is added to the target field column.
Table column: corresponding the components in the dashboard to the fields of the table to be commit to the database by matching the source and target column.
Key: a column that is a condition when commit to a database. You can select one column or multiple columns. Data cannot be updated and deleted with unconditional columns. Starting from version V9.3, support ordinary parameter components and system parameters as conditions.
Commit: columns that you want to be committed to the database cannot be committed to the database when not checked.
Source column: all the form parameters in the current dashboard of the bound column column / freestyle form components in the cell, parameter components, 4 built-in parameters, such as: form parameter 1: sales, form parameter 2, order ID, freestyle form 1: cell1, freestyle form 1: cell2: cell3, text parameter 1, combobox 1, _ NOW _...
Target column: the column of the table in the database you want to commit to, namely the selected table in the target table.
Condition check: data form support condition check, according to the specific business requirements, determine the filling check rules.
Fallback all when check fails: after checking, there are multiple mapping relationship in a single commit, as long as any data mapping relationship detection error, all data fallback is not written to the database. By default, the data corresponding to the database relationship is normally mapping, and the data corresponding to the detection error mapping relationship is not written to the database.
Commit type: form the commit type, refer to the form commit type.
Instructions for condition check:
•When the right comparison object of the condition check is the parameter component in the form dashboard, the parameter component must set the mapping in the field, otherwise the parameter component value cannot be obtained normally.
•In the form parameter component, the right comparison object of condition check can select other columns in the component.
•The freestyle form component, and the comparison object on the right can select other cells in the component.
•Other parameter components can be selected from the comparison object on the right side of parameter component condition check.
The mapping setting operation steps are as follows.
•Click the add button to set the name to "Form1".
•In the form dialog box, select the connection and table to be mapping, click the auto match field group to automatically match the source column and target column, and check the check box of the key corresponding to the order ID line.
•Set the condition check of the source column sales volume: the sales volume is> = 5.
•Set the commit type for update commit, and click OK. In this way, the mapping is set up completely.
2.Form in the commit type
The types of form commit include: insert commit, update commit, delete commit, and intelligent commit.
•Insert commit: insert data and execute the inset statement in the database.
•Update commit: the operation to update the data and execute the update statement in the database. Specifying the key is necessary in the submit update, equivalent to the where conditional section of the location of the data to be modified in the update statement.
•Delete commit: delete the data and execute the delete statement in the database. Specifying the key is necessary in the delete commit, equivalent to the where conditional section for the removal of the data in the delete statement.
•Intelligent commit: according to the data changes, intelligent judgment to do the "add, delete and change" operation.
Scenario 1: The bound data on the form class component is the same as the backfill target table, and the database target table has the key (following "id" as an example). The intelligent commit judgment is as follows:
•Delete a row of data to do the delete.
• Add existing id data, add this id data to update; add unexisting id data, make this id data insert.
•Modify the data of the rows to do the update.
Scenario 2: The bound data on the form class component is the same as the backfill target table, and the database target table has no key. The intelligent commit judgment is as follows:
•Delete a row of data to do the delete.
•New row of data to do insert.
•Modify the data of the rows to do the update.
Scenario 3: The bound data on the form class component is not the same, and the database target table has the key (following "id" as an example). The intelligent commit judgment is as follows:
•Delete a row of data to do the delete.
•Add existing id data of target table, add id data to update; add id data of target table, add id data as insert.
•Modify the id data in the target table to make this id data update; modify the id data in the target table to make this id data insert.
Scenario 4: The bound data on the form class component is not the same, and the database target table has no key. The intelligent commit judgment is as follows:
•Delete a row of data to do the delete.
•New row of data to do insert.
•Modify the existing key data of the target table to make the key data update; modify the existing key data of the target table to make the key data insert.
3.Form in the commit method
The form commit supports the "Commit" component and the toolbar "Commit".
3.1Commit button commit
Add the commit button in the dashboard first.
•Form commit
Setting: on the right toolbar of commit component [Setting> Options> Commit Type] select "Commit data to database", [parameter] select the mapping relationship to be committed, as shown in the figure.
Commit: click this commit button in the review dashboard, and the selected form will be committed at the same time. The commit type is the commit type selected in "Form mapping", and the "Commit type" option refers to the above.
Close the dashboard automatically when form succeeds: that is, after clicking on the successful commit, the form page will be automatically closed.
•Script commit
Setting: in the right toolbar of the commit component [Settings> Script], write the commit script in the "On commit" of the script popup. Please note that the data should be refreshed through refreshData() after executing the commit script, as illustrated in following figure.
The commit script is as follows, which supports both multiple form relationships and multiple form relationships in turn.
Commit type
Script
Use examples
Insert commit
insert(String formParmeter):void
insert("my_first_form");
//Commit multiple forms at one time
insert("form name,my_first_form");  
//Commit multiple applications in turn
insert("my_first_form");insert("my_first_form_db2")
Update commit
update(String formParmeter):void
update("my_first_form");  
//Commit multiple forms at one time
update("form name,my_first_form");
//Commit multiple applications in turn
update("my_first_form");update("my form_db2")
Delete commit
remove(String formParmeter):void
remove("my_first_form");
//Commit multiple forms at one time
remove("form name,my_first_form");
//Commit multiple applications in turn
remove("my_first_form");remove("my form_db2")
Intelligent commit
autoCommit(String formParmeter):void
autoCommit("form name");
//Commit multiple forms at one time
autoCommit("form name1,form name2");  
//Commit multiple applications in turn
autoCommit("form name1");autoCommit("form name2")

3.2Toolbar commit
If there is no commit button in the form dashboard but the form scenario, the Commit button appears at the top of the dashboard.
Precondition: there is no commit button in the dashboard and the commit operation is configured in the toolbar (configured by default).

reply

Using props report

Advanced mode
You need to log in before you can reply to the post login | Free registration

© 2024 VIVIDATA PTE. LTD. All Rights Reserved. Privacy Statement