User-Defined Pick Lists
Any field in which data is limited to a controlled vocabulary is called a Pick List. For example, Specify ships with the Agent Title field limited to the choices of Asst. Director, Curator, Dr., Mr., Mrs., and Ms.
New user-defined pick lists can be created for existing fields but the field on the affected form will not be updated until the form itself has been edited. For this reason pick lists should NOT be defined until the new form containing the pick list has been imported into Specify. If pick lists are defined without being included in the existing form, data entered into the existing form will not be saved in the database.
At this time Specify 6 does not include a Form Editor, as was found in Specify 5. It is important to note that the forms have been created programmatically to be extremely flexible and can be exported as XML and either edited locally by an experienced XML editor, or emailed to the Specify staff for customization assistance. To export a form please refer to Importing/Exporting. Members of the Specify Collections Consortium may contact our support desk at support@specifysoftware.org for help editing their forms.
Pick lists that are defined within Specify are called system pick lists. New pick lists created by the user are referred to as User- Defined Pick Lists. The following text describes the steps to create a user-defined pick list.
Any pick list changes are reflected in the current collection only. Specify allows pick lists to be exported and imported, allowing quick sharing among collections and collecting communities. This feature also allows the Specify team to create and share pick lists at the same time they create custom forms. More information about importing and exporting Pick Lists can be found in the text below.
Creating and Editing User Defined Pick Lists
Any string field can be configured as a pick list.
Add, delete and edit the pick lists in the Pick List Editor found in System > Schema Configuration. The Schema Configuration tool is only available to users in a manager or administrator group.
- Choose English as the language.
- Click the Edit a Schema button.
The Schema Configuration tool will open.
- Choose a table from the list of tables.
- Choose a field from the list of fields.
- Choose pick list from the format type combo box.
The following combo box and button appears:
Field Format Type
The second combo box is used to link the newly created pick list to the field. The (...) button opens the Pick List Editor.
Add a Pick List
To add a new pick from within the pick list editor, leave the second combo box as 'none' and click the (...) button.
- Choose the (add) button.
A second dialog will open to configure the pick list. There are three types of pick lists, all with different configurations:
1. User Defined Items is a predefined list. Items in this type of pick list are either created by the user (controlled vocabulary) or created when values are typed into a field.
A Pre-defined pick list is very useful to control the exact data entered into a field. A good example of this is Type Status Name in the determinations form. Anyone entering determinations is limited to the same set of data choices.
To create a predefined list of items:
- Choose User Defined Items from the Type drop down menu.
- Type a name in the Name text box.
- Check the Read Only check box.
- Click the (add) button in the Items section.
- Type a Title will appear on the form.
- Type a Value is stored in the data base. It is a good practice not to use spaces. The Value exists so that at a later date the Title can be edited without needing to change the value in the data base.
Use a pick list that is created as values are typed into the field when a controlled list is required but but it is also necessary to allow users to enter new values.
To create a pick list that is created from entered data:
- Use the steps above, but Do Not check the Read Only box.
- Size Limit field - limits the number of values in the pick list. Once the list has reached this number of values the oldest value will be dropped from the list.
2. Entire Table allows all values in a formatted table to be listed. This is a useful tool when the field needs to link to an entire record but the list of values is small and a Query Combo box is not necessary.
To create an Entire Table list:
- Choose Entire Table from the Type combo box.
- Type a name for the pick list in the Name text box.
- Choose a Table from the Table Name combo box.
- Choose a Formatter from the Formatter box; this typically will offer only a single choice.
3. Field From Table uses the values from a field within a table. Creating a pick list from a field is only feasible when there will be a small number of values. If the number exceeds 12 it is suggested that the field be linked to a Query Combo Box within the form rather than a pick list.
To create a Field From Table list:
- Choose Field From Table from the Type combo box.
- Type a name for the pick list in the Name box.
- Choose a Table from the Table Name combo box.
- Choose a Formatter from the Formatter box -- in most cases there will not be more than one choice for this.
- Choose a field from the Field Name combo box.
Once the pick list has been created, it will need to be linked to the field.
- Click the second combo box (currently displaying 'None').
- Choose the pick list name from the list.
Edit a Pick List
To edit a pick list from within the Pick List Editor:
- Click the (...) button to open the Pick List Editor.
- Click the (edit) button.
- Use the same information in Add a Pick List to change the configuration of an existing pick list.
Import/Export a Pick List
Pick list definitions in a collection can be exported as an xml file and imported for use in a new collection. In this way, pick lists can be shared within an institution, collecting community, or between the Specify staff (who are creating custom forms) and users.
The Import and Export function is only available in the Pick List Editor found in the Schema Configuration tool.
Note: If a pick list of the same name already exists, the imported pick list will replace the existing one.
Note: The values within a pick list will not be imported in the Entire Table or Field From Table pick list types. Only the pick list definition will be imported for these types of pick lists.
Import
- Click the Import button.
- Choose the pick list xml file you wish to import from the file manager.
- Click the Open button.
The pick list will either be added to the list of User Defined Pick Lists or replace the existing pick list.
Note: Forms must be edited to show pick lists. If you import a new pick list but do not edit the field on your form you will not see the pick list.
Export
- Click the Export button
- Select the pick list(s) you would like to export by checking them in the dialog.
Select All will select all the pick lists in the dialog. Deselect All will deselect all the pick lists in the dialog.
- Click the OK button.
- Choose a location for the pick list file from the file manager.
- Click the Save button.
Note: The pick list will be saved as: 'disciplinename'_'collectionname'.xml