Picklists
A picklist is a set of values that you associate with a field in your collection. When a field has an associated picklist, the data-entry and data-editing screens display the field text-entry box with a drop-down list, allowing you to pick a value from the list rather than having to type in a value.
An example of a picklist, displayed as a drop-down list in a data-entry/editing window:
Note: Picklists can only be associated with short text and one-line text data fields.
In addition to drop-down lists, one-value or two-value picklists can be represented in the editor by a checkbox control. This is described in a section at the end of this chapter.
In some cases, you may want to be able to select more than one value from a picklist. For example, for a collection of plants, you might want to record the months when the plant is in bloom. If you have a picklist containing the 12 months of the year (Jan/Feb…/Dec), and you are editing a record for a plant that blooms in March and April, you would want to pick both values from the picklist (Mar and Apr). This can be done by creating a multi-choice picklist. A multi-choice picklist is identical to a normal picklist, except that its name ends with a plus-sign character (+). You could create a picklist named Month+, and the plus-sign at the end of the picklist name tells Recollector to use a multi-choice selection panel, rather than a drop-down list, for any fields in the editor that are associated with this picklist. Multi-select picklists are described more fully later in this document.
To create, modify or delete a picklist, select Options > Manage Picklists from Recollector's menu. This brings up the Manage Picklists dialog.
View the Manage Picklists dialog ... |
To create a new picklist, click the Create button. To edit or delete an existing picklist, select the desired picklist from the dropdown list and click either Edit or Delete. You can see the values defined by the currently selected picklist in the list below these buttons.
Creating or editing a picklist definition ... |
Strict and non-strict picklists:
A checkbox at the top of the right-hand panel in the Manage Picklists dialog lets you choose whether this picklist is strict or non-strict. In the data-entry/editing window, a field that is associated with a strict picklist can only have a value that is defined by the picklist (though the field can also be left blank). The text-entry box of a field associated with a strict picklist will not let you type in a value that is not in the picklist. A non-strict picklist allows you to type any value into the text-entry box for the field, but the dropdown list is still present, to make it easy to quickly choose from among the commonly expected values for that field.
Associate a picklist with a field:
A picklist can be associated with one or more short text or one-line text fields. To make the association between a picklist and a text field, make sure the picklist is selected from the drop-down list at the upper left. At the lower-right pick a text field from the Associate a field with the picklist drop-down list, and then click the Associate button. Note that the drop-down list at the lower right only includes short text and one-line text fields that are not already associated with the selected picklist. (The ID # field, though it is a short-text field, cannot be associated with a picklist.) To remove an existing association, select the field name from the list at the right and click the Remove Association button.
Copy and paste picklists:
If you have multiple collections, you may want to set up a long picklist in one collection and then use it for a similar purpose in the other collection. To avoid the work involved in typing in all the values of this long picklist twice, you can create the picklist in one collection and click the Copy picklist button. Then open the second collection, go the Manage Picklists dialog and click the Paste picklist button. This will open the Picklist Definition dialog, initialized to the set of values that were in the original picklist. All you need to do is to give a name to the picklist and associate it with one or more fields.
Consider auto-completion as an alternative to picklists:
Auto-completion lets you type the first few characters of a text field value and then press the ESC key. Recollector will see whether any existing values for this field in your collection begin with the same letters. If a match is found, Recollector will either fill in the rest of the value (if only one other existing value matches the starting letters you provided), or a popup menu will let you choose from among the existing values that start with the same letters. Auto-completion is provided by Recollector for all short and one-line text fields, except for the ID # field and any field associated with a picklist. Auto-completion is not provided for long text fields or for non-text fields. Auto-completion is easier to set up than a picklist, since there is no set-up required, but it only helps you enter values when the desired value already exists in another record in your collection.
Auto-populating picklists
If you create a picklist with a single value, and that value is [AUTO] (the word “AUTO” may be in upper, lower, or mixed case, but it must be enclosed within square brackets, as shown), then Recollector will automatically populate the values in the picklist by the actual values found for the associated field in the existing records of the collection. These auto-populating picklists are always treated as non-strict, allowing you to enter new values. Any new value that you enter will get added to the auto-populated picklist for the next time you add or edit a record to the collection. You only need one such auto-populating picklist definition for a collection, since this picklist – and the editor behavior that it provides – can be associated with multiple fields. In this case, the displayed dropdown list for each field will show the existing values for just that field.
An auto-populating picklist is very much like the auto-completion capability described in the previous section of this chapter. Both capabilities provide a way to easily select a new value by choosing from the existing values for a field that occur in other records in the collection.
Creating a checkbox with a picklist
If you have a field that is best represented in the editor by a checkbox – in other words, the value of the field is either on or off – then you can create a special picklist which Recollector will recognize as instructing the program to display the field in the editor as a checkbox. To do this, create a picklist with either one value or two values, and precede the first value by the word “checkbox” followed by a colon. The following shows the values from a two-item picklist that has been set up to provide a checkbox in the editor:
In the editor, a field that uses this picklist will be represented by a checkbox that looks like the following:
A one-item picklist can also be used to generate a checkbox control in the editor:
In the editor, a field using a one-item checkbox will look the same as the two-item case:
The difference between a one-item and two-item picklist is reflected in the data value that the field will eventually contain when the checkbox is in the unchecked state. With a one-item picklist, a field represented by an unchecked checkbox will have an empty/missing value, whereas with a two-item picklist the field will have the second of the two values and will therefore never have an empty/missing value. Note that the checkbox is only shown in the editor. In the Item Details view the field will be shown like any other field: a field label followed by a value (or not shown at all if the field’s value is empty/missing):
Similarly, the field will be shown as a simple text value in the List view or the Image Gallery labels; only in the editor will it be shown as a checkbox.
The choice of whether a picklist is strict or not strict is ignored for checkbox picklists.
Multi-select picklists
As described earlier in this section, a picklist whose name ends with a plus-sign (+) character will cause associated fields to be handled in the editor using a multi-select picklist dialog. A multi-select picklist is shown in the editor with a check-box button to the right of the field’s text-entry box. The text-entry box for the field cannot be directly typed into; its content must be specified via the multi-select dialog which is brought up by clicking on the button:
Clicking on the check-box button brings up the multi-select panel:
Click on one or more of the check boxes to select the values that you want to include in the field. If you choose multiple values, they will all be entered into the field, separated by the specified separator. If Mar and Apr are checked, and semi-colon is selected as the separator, the field will look like this when you click OK:
If a field associated with a multi-select picklist already has values in it, when you click the button and bring up the multi-select panel, it will be opened with its check boxes reflecting the current values. If some of your individual picklist values contain spaces (or commas), the program may not correctly reflect the currently selected values, particularly if you previously used space (or comma) as the separator character. It is recommended that you choose, as a separator character, a character that does not appear in any of the individual picklist values. Since semi-colons are unlikely to be used in picklist values, semi-colon is the default separator recommended by the dialog.
To uncheck all the check boxes, click the Clear Selections button.
Be aware that if a field is associated with a multi-select picklist, the contents of the text box in the editor for this field can only be modified through the multi-select panel. You cannot directly type into, or select characters and delete, the contents of the text box in the editor. You must click on the check-box button to bring up the multi-select panel in order to make changes to the field’s contents. Because of this behavior, multi-select picklists must be ‘strict’. If you turn off the Strict setting for a picklist whose name ends with a plus-sign (+), it will behave like a single-select picklist.
You may find that you want to use the same picklist in single-select mode for one field and in multi-select mode for a different field. The example shown above used multi-select for the Blooming months field, since a particular flower might have multiple months of bloom. But the same collection might have a field that specifies the earliest planting month, and for this field a single-select picklist (with the 12 month values) would be appropriate. You cannot use the same picklist for both single-select and multi-select field associations. To handle this case, create the initial picklist, and give it a name that does not end in a plus-sign (+) character. This is the picklist to use for single-selection situations. Then use the Copy picklist button, followed by the Paste picklist button, to make a second picklist, with the same set of values in it. But add a plus-sign (+) character at the end of the name of the new picklist. This, then, becomes the picklist to use in multi-select situations. By using the Copy picklist and Paste picklist functionality, you will only have to specify the set of individual values once.
Related topics: