Joget Workflow v6 Released
Check out the latest Joget Workflow v6 for many new features and improvements in user experience (UX), app maintainability and performance.
You may want to store certain fields from your form to other tables with the use of the Beanshell Form Binder. Figure 1 shows an example of a form where the first 3 fields are to be stored in another data source in addition to the original form data table.
Figure1: Form with Field to Store
The quick and easy approach in addressing this requirement is to make use of Beanshell Form Binder in the section's Store Binder. Edit the section.
Figure 2: Configure Section Properties to Determine How Data Will Be Handled
Figure 3: Choose Beanshell Form Binder as the Store Binder
In Store Binder, choose "Bean Shell Form Binder" as the store binder.
Configure Bean Shell Form Binder with your own coding to store the fields as intended, as shown in the figure below.
Code used in this example:
Figure 4: Populate Beanshell Form Binder with the Necessary Codes
If the coding is properly written and tested, you will get this result:
Figure 5: Fill and Submit Form
Check the data in the database.
.Figure 6: Data Stored Correctly in the Tables