Data Driven Combo Box Overview |
DEVELOPER |
Data Driven combo boxes in essence allow you to hide the first column of a combo box from the end user. This functionality is particularly beneficial if you use the PROIV Multilingual capabilities. Systems often include many codes which appear as selections in combo boxes. If your screens have been translated and your codes remain in the base language of the application, this can look rather odd. Data Driven combo box functionality enables you to hide these codes but still write away the code data to the PROIV Virtual Machine.
To explain further, when you enter data into a Data Driven combo box, you enter characters corresponding to the rendition values in the column 2, but the actual value returned to the PROIV Virtual Machine is taken from column 1 of the same row. For the correct conversion of column 2 data into the corresponding column 1 data, the new data entry is compared against data in column 2, if there is a match (length and case are checked) then the incoming data is modified to be the corresponding entry in column 1. If no match is found in column 2, the data is saved as it was entered and no conversion occurs.
Note: Data Driven combo box functionality can be switched on and off and when it is disabled, it does not affect existing combo box behavior. |
Overview
-
When you select a row or type into a Data Driven combo box, the value in column 2 appears.
-
When you leave a Data Driven combo box, the value in the hidden column 1 is used by the PROIV Virtual Machine.
Important Notes
-
It is the developer’s responsibility to validate that an entry exists in column 2, and that the entries are unique. If they are not unique, PROIV’s behavior becomes undefined and it may write column 1 data against any column 2 match it finds.
For example, if you type or pick 'ABC', then either '001' or '002' could be written to column 1 because the values in column 2 are not unique.
Column 1 |
Column 2 |
001 |
ABC |
002 |
ABC |
-
In the situation where you have existing combo boxes that you want to turn into Data Driven combo boxes, it is important to ensure that the input length of a Data Driven combo box is sufficiently big enough to receive the data from column 2.
In the following Data Driven combo box, the input length must be increased to receive the data sent to it by column 2. For example, when the user types 'PayrollDepartment' into the combo box, the data will be truncated at the fourth character. You need to increase the input length to at least the length of the longest string that can be typed into the combo box. If this does not happen the matching process will fail.
Column 1 |
Column 2 |
AAA |
PensionDepartment |
BBB |
PayrollDepartment |
-
If there is no matching first column (possibly a record on a table has been deleted since the data was added), then the combo box displays the data stored on file. For example, if the data on file is ‘0001’ which should display ‘Doctor’, but record ‘0001’ has been deleted, then ‘0001’ will be displayed.
Section links:
Comparison between Standard and Data Driven Combo Box Behavior explains the differences in combo box behavior with examples.
Topic ID: 500528