My requirement was to create a multi-select check box custom field – in the “Organisations” object – where the user could tick or un-tick many options. Pretty much like the out-of-the-box field “State” in the “Organisations” object shown in the image below. Unfortunately it is not possible to create a multi-select check box like this within the database.
My workaround was the following:
Step 1: Create a “Yes/No” type Custom Field with “Default Value = No” for each of the options.
Click the “Configuration” button in the Navigation Pane > Double-click “Custom Fields” under “Database” in the Navigation List > Select “Organization” object and click “New” on the ribbon.
Step 2: Add a new tab to the “Organisation” workspace, make it hidden, and drag/drop the Custom Fields into it.
Double-click “Workspaces” under “Application Appearance” in the Navigation List > Select and Open the Workspace > RightClick a tab in the tab set and chose “Add Tab After (Before)” > Select the new tab, go to the “Design” tab “Behavior” section on the ribbon, click “Hidden” and select “On New” and “On Open” > Select the “Insert Field” tab on the ribbon and drag/drop the fields to the workspace.
Step 3: Insert a List Box control on the workspace, for each of the options.
Create a new section (with “Title Bar” and “Spacer” controls) on your workspace > Go to the “Insert Control” tab “Controls” section in the ribbon and drag/drop List Boxes into the workspace.
Step 4: Set the “Allow Multiple Selections” in each of the List Boxes and Edit the name according to the options.
Select each List Box, go to “Design” tab “Options” section on the ribbon > Set “Allow Multiple Selections” > Edit the name of the item in the List Box on the “List Box Items” section.
The fields in the workspace will look like the following image:
Step 5: Add a workspace rule to each of the List Boxes
Select the List Box, go to the “Rules” tab “Rule List” section on the ribbon and click “Add Rule”
Step 6: Create a rule to set the Custom Field after List Box item is ticked
Trigger: An input control value is changes (select the desired List Box)
Condition: An input control has a certain value (select the desired value for the List Box Item)
Condition: A field has a certain value (select the desired value “N” for the related Custom Field)
Then Action: Set the value of a field (set the desired value “Y” for the related Custom Field)
Step 7: Add a workspace rule to the workspace for when the editor loads
Go to the “Home” tab “Workspace Properties” section on the ribbon and Click “Rules”
Step 8: Create rules (as many as List Boxes) to tick the List Box items when the editor loads
Trigger: The editor loads
Condition: A field has a certain value (select the desired value “Y” for the related Custom Field)
Then Action: Set the value of an input control (select the desired value “Y” for the List Box Item)
When this is finished, you should be able to create an Organisation record, select the check boxes you want, save the record. When you come back and open that same Organisation record the check boxes will be ticked as you selected them previously.
Note: Before choosing to create a List Box for each of the options, I tried to do it with only one List Box with many items (one for each of my options). It didn’t work because I realised that workspace rules with the same trigger will work (one after the other, by the order in the list) if the action regards different fields or controls, but not if rules try to set the same control.
Thank you to Mark Kehoe (Independent Oracle RightNow Consultant) for his help on this requirement.