m-Power maintenance applications have long supported Checkboxes as input values. One complaint of this feature, however, was that these values could only support one value at a time. This document will explain how the main m-Power maintenance templates (Single Row Maintainer and Display & Maintain Rows) can be configured to support multi-value checkboxes.
To implement:
- In Field Settings within your maintainer, choose “CB” from the “Validity Rel” dropdown list. Then in the “Validity Check Value” input, insert your values, separating with a space.
- Compile and run your application.
- By default, multiple values will be stored in the database as one value, separated by the “||” characters.
- If you wish to use a different symbol set as a delimiter, go to Admin -> Edit Dictionary Files -> Servlet Properties. Here you should change the “value_separator” value to a character(s) of your choosing. Press Accept. You will not need to recompile your application.
Note:
If you cannot find the “value_separator” in your Servlet Properties file and wish to modify the default, you will need to add the following code to the “Program Options” section of your Servlet Properties file: