External databases can be used to populate the Grouped Options of various fields in the iCM Forms Designer. This includes Radio Groups, Checkbox Groups, Drop-down Lists and List Boxes.
The FormUtils Worker also provides various methods for interacting with external databases, including reading data and executing SQL statements.
Defining Datasources in the API Server Configuration
Any number of datasources can be defined in the configuration that is sent to the API Server. The API Server configuration files are held in the iCM custom folder, generally available via iCM's file manager.
To add a datasource to the configuration, add an
"environmentConfig": {
"dataBases": {
"default": "icm",
"dataSources": {
"mydatabase": {
"databaseDriverClass": "com.microsoft.jdbc.sqlserver.SQLServerDriver",
"databaseUserName": "theusername",
"databaseConnectionString": "jdbc:sqlserver://GI00645:1433;DATABASENAME=mydatabase;sendStringParametersAsUnicode=true;SelectMethod=direct",
"databasePassword": "thepassword"
}
}
}
}
This configuration will be merged with the standard configuration sent from iCM when you send it to the API Server. See the API Server and Worker Configuration article for more information.