What are 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 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. Pick lists that are shipped with Specify are called System Pick Lists.
Pick lists are scoped to the collection, which means that pick lists only exist within the collection they are defined in. If you would like to use the same pick list across multiple collections, it must be created in each collection individually.
Create a Pick List
To create a new pick list in the interface, you can follow the steps below until Step 6, then you can click on the icon to the right of the Pick List field format.
Alternatively, you can navigate directly to this URL in your Specify installation:
https://your-specify-instance.specifycloud.org/specify/view/picklist/new/
Where
/specify/view/picklist/new/
is added after the base URL for your Specify instance.
New Pick List From
Type
A pick list can be one of three types:
User Defined Items
A User Defined
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.
Entire Table
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.
Field From Table
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 there is a large number of existing values, it is suggested that the field be linked to a Query Combo Box within the form rather than a pick list.
Name
In this field, you can enter a name for the pick list. This should be unique unless you intend to create a duplicate for a number of reasons.
Read Only
If this box is checked, users can not create new values in this pick list. If it is unchecked, new entries can be created when a user is entering data on the form.
Table Name
If you are creating a pick list that has a type based on a table (Entire Table
or Field From Table
), this is where you can choose the table you are selecting the pick list values from.
Formatter
This field contains the formatter for the record in the table above if you are using the Entire Table
pick list type.
Field Name
This field contains the field name that the pick list pulls from in your specified table if you are using the Field From Table
pick list type.
Size Limit
The size limit is the maximum number of pick list items that can be added. This only applies to the User Defined Items
pick list type.
Pick List Items
In the Pick List Items subview, you can add () or remove () items from the user-defined pick list.
The Title is the value displayed in the interface and in query results.
The Value is the value stored in the database and shared to data aggregators.
If the field you are assigning the pick list to has room, we reccomend using the same value for both the title and value fields.
Make sure that you set the size limit to be large enough to contain all of the pick list items that are added before saving.
After creating a new pick list, you can either clear your browser’s cache or log out and back in before following the steps to assign the pick list to a field.
Part 1: Assign a Pick List to a field (Schema)
You must assign the pick list to a field in the form definition as well. Instructions for this are defined lower in this guide.
Any text field (with enough available characters) can be configured to be a pick list.
-
Open the User Tools menu.
-
Navigate to the Schema Config tool.
-
Select the language you would like to customize the schema for.
-
Select the table you would like to add a picklist to.
-
Select the field that you wish to assign a pick list to.
-
Change the Field Format to Pick List by selecting the radio button to the left of the pick list text.
-
You can now select and assign a pick list to this field.
-
Once you are finished making changes, select Save in the top right to save your changes.
Part 2: Assign a Pick List to a field (Forms)
-
Navigate to the Schema Config tool and confirm that the pick list has been assigned to the desired field.
In this case, I have mapped the Pick List
address
totext1
in the Schema Config. -
Add the field to your form definition and set the
uitype
to equal"combobox"
.Note: You can learn more about form editing in the documentation for.
Editing Forms.Members can contact support@specifysoftware.org for additional help when customizing forms!
Example XML below:
<row> <cell type="label" labelfor="addressPickList"/> <cell type="field" id="addressPickList" name="text1" uitype="combobox"/> </row>
-
You can either clear your browser’s cache or log out and back in, then you should see the latest changes reflected on your form.
Now you have a pick list displaying on the form!