Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Figure 1: JDBC Validator Properties

NameDescription
Custom JDBC DriverCustom JDBC Driver. This field is required when Custom Datasource is selected in Datasource above.
Custom JDBC Password

Custom JDBC Password. This field is required when Custom Datasource is selected in Datasource above.

Test the connection parameters

Click on the "Test Connection" button at the bottom of the page to quickly test out your configurations

Datasource
  • Custom Datasource
  • Default Datasource

By selecting Default Datasource, the database your Joget is currently using will be selected

Mandatory The purpose of a mandatory select box in the JDBC Properties option is to require the user to select a value from a predefined set of options, ensuring the proper configuration of essential settings and preventing potential errors caused by invalid inputs.
Custom Error Message to Show When Validation FailCustom Error Message to Show when Validation Fail" input field in the JDBC Validator properties allows you to provide a personalized error message that will be displayed to users when the validation query does not pass. This feature helps improve the clarity and usability of your Joget DX 8 applications by offering more meaningful feedback to users during the form submission process.


Understanding JDBC Validator 

Query Explnation 

Assuming you have a Joget DX 8 form that deals with budget entries and you want to validate whether a budget entry with the same year ('c_year') and name ('c_name') already exists while excluding the current budget entry (identified by its 'id'), you can use the following SQL query within the JDBC Validator (shown in Figure 2: Demo):

SELECT * FROM app_fd_budget WHERE c_year = {year} AND c_name = {name} AND id != {id}


The combination of these conditions ensures that the JDBC Validator checks for duplicate budget entries with the same year and name, excluding the current budget entry being edited (identified by its 'id') from the validation process. 




Figure 2: Demo