Select Lists define the options that are available to Users in selection Fields. By limiting the choice to a defined list it validates that when the User selects the value the data entered is in the required format. Select Lists are stored globally and so once defined they can be used for multiple Fields across multiple Apps.
Accessing the Select Lists
To access the Select List area, first select Settings from the COGS Menu and then select the 'Select Lists' folder in the left pane menu.
To edit the options in an existing Select List click on the row from the List of all existing items. To create a new Select List, click on the '+' icon next to Selection in the left pan menu. If it is a new Select List then you will need to add an Identifier and a Name.
Identifier: This is a value so that the system has a unique reference to the Selection Options you are creating.
Name: The name is how you will recognise the Select List for selection when assigning it to a Selection Field.
Adding the Selection Options
On the Select List edit page you will be able to choose what values to appear for the Field that it is assigned to. Click on 'Add an item' and for each option that you add to the Select List, you will need to enter three values.
Text: This is the friendly name for the option that will be shown to the User when they are inputting data on screen. It may also be used in Reporting as the friendly name for the selection made
Value: The value is what is stored against the Field in the database when the Text has been selected.
Note: In our example these are the same but it could be that they differ. One example would be if we wanted the User to score priority on a scale of 1 to 3 then the selection values could be 1, 2 & 3 but the Text against each could be the friendly name to the User of Low, Medium & High.
Display Order: The display order is the order that the selection options appear in. If no Display Order has been set then the options will display in the order that they were added. To specify a Display Order assign each Selection option a numeric value. They will display first to last in the selection based on lowest number first.
You can toggle between the edit and done view of the Selection Option by clicking on the row to open the edit mode and clicking on done to close the edit mode. If you want to remove a selection item then this can be done by clicking on the cross on the right of the selection option.
Once you are happy with the Selection Options that you have added click on the tick icon at the top right of the screen to save the Selection List.
Adding the Select List to a Field
Having created the Selection Options, these can now be assigned to a Field. For the Field Type Selection, it will let you choose from the list of globally stored selection options.
You also have the option of defining the Select List at this point by clicking on the edit icon to the right of selection options. It will pop open a pane with the option to choose a Select List to update or create a new Select List.
Having chosen the Select List you will then need to specify the type of Selection and if the values should be text or numeric. This will affect the data type that the value chosen will be stored as.
Note: Select Text or Numeric wisely, a numeric Selection Field with text values will not store the value on change as it is not a valid number. It also affects how the value will be parsed if it is used in any Expressions for other Fields.
Different Options for Display Select Lists
Once you have created your Select List, you can select this for a Selection Field to present the options to the User. There are four different ways that these can be displayed based on the Select List Type set for the Field by the App Builder.
Select: This allow the User to make one choice from the list of options in the selection Field. The user will click a drop down that will show all of the available selections and then they will choose one. They can then remove their selection back to 'Select an item..' if they want to.
Radio: This Selection type shows all of the options to the user and then they can make a selection of one option. Choosing another option will remove the previous selected option. Once a value has been selected, the user can only choose a new option. They cannot clear their selection.
Checkbox & Listbox: This presents all options to the User and they can then select or deselect the options as they would like. The only difference is in how the data appears. See the image below for an example. For the checkbox this is by clicking the box to the left of the value. For the List box multi-selection and deselection can be made by holding 'Ctrl' whilst making the selection.
Note: If there are seven or more options for the user then the Radio and Checkbox Fields will change to show the options horizontally across the page instead of vertically.
The selection type can depend on what you want to use the data for. Checkbox and Listbox will store the data as an array of items. This is fine if the Field value is only viewed within the Record but does mean that it cannot be used in Reporting. If the values are need to report against then restricting the User to one selection is advisable.