List is a collection data type. It allows multiple values to be stored within the same field. The List data type must be configured with the values that will be available for fields within records. Any number of values can be selected in each record.
For example, in a Patients table, Allergies may be a List-String data type that is configured with all known allergies. Within an application, a user filling out a New Patients form can select all the allergies that pertain to them from the provided options.
There are three List data types:
- List – String for text values of up to 255 characters.
- List – Number for numeric values of up to 15 digits.
- List – Date for date or date/time values.
Adding a List Field to a Table
Follow these steps to add a list field to a table:
- Open a Table in Design mode.
- Click on the last row to add a new field. You may have to scroll down to see the last row.
- Enter a name for the field in the column Name
- In the DataType column, select the List data type that you need. The options are:
- List – String
- List – Number
- List – Date
- On the right pane, under the Options section, you must provide the Values available for this data type. Up to 1000 values are supported. You can enter the values one by one, paste a list into this area, or import from one of your existing tables by clicking the import icon .
- Use the toolbar at the bottom of the Values list to add, delete, rearrange, or sort the items in the list. The order of Values applies to current and future fields.
- Click Save to save your table design.
In table Datasheet view, the List data types are presented as a dropdown of checkboxes. The Values of the List data type are the options in the multi-select checkboxes.
List Fields in Form DataPages
List fields allow you to provide a multi-select list of options in all interfaces designed for entering data, including search forms, submission forms, editable details pages, inline add and edit, and bulk and grid edit forms.
In DataPage wizards, List fields can be configured as one of the two special form elements:
- Multi-select listbox
- Multi-select dropdown
You can enable Show “Select All” for List fields in forms. It adds an option with text that can be localized, to the bottom of the form multi-select listbox or multi-select dropdown. This option allows the form user to quickly select or deselect all options.
Displaying List Fields in DataPages
All DataPages can display the existing values of List fields. The collection of values can be presented in any of the following formats:
- Simple list
- Bulleted list
- Numbered list
List Fields in Search and Filtering Criteria
The following comparison types are available for List fields in DataPage search forms and predefined criteria, as well as in Datasheet filtering option and in configuring Views:
that contain exactly each of the provided values are returned. If a record contains additional values, it does not meet the criteria.
For example, if A and B are selected, only records that contain A and B are returned. If a record contains A, B and C it is not returned.
|Not Equal||The exact opposite of Equal. Only records that are not the exact match of the provided values are returned.|
|Contains||Records that contain all the specified values, but may also include other values are returned.|
|Does Not Contain||Records that do not contain all the provided values are returned. It only excludes records where all the provided values are present.|
|Blank||Records with List field having no values are returned.|
|Is Not Blank||Records with List field containing at least one value are returned.|
Additional Notes About List Fields
- Up to 1000 Values can be defined in each List data type and up to 1000 values can be stored in each List field.
- All duplicate and blank values are automatically removed when table design is saved.
- At the time of 9.6 release, Lists cannot use lookup tables.
- Changing the Values of a List does not affect the values in existing records.
- Each List field can be repeated in up to 15 search or filter criteria in DataPage or View wizards.
- At the time of 9.6 release, List fields cannot be used in Rules, Charts, Pivot Tables, Grouping, Aggregations, Parameters, Formula Field, and Calculated Field. Lists will be supported in more areas in future releases.
Watch the video below to see how to create multi-select dropdowns in Caspio: