Creating Dropdown Lists
Dropdown lists provide a means of forcing a field value to be selected from a pre-defined list, rather than being edited or selected from a part of the database.
Note: To create a dropdown that is sourced from another tab in your application, use Links instead.
An example of a dropdown list might be a task status. The possible values might be Not Started, Pending, Complete, or Deferred. These are predefined values and won't change after the application is published. You wouldn't want the user to type in their own task status as this will make it more difficult to determine the actual status of the task.
You'll notice dropdown lists in the WorkflowFirst application, such as the dropdown list under Data Type or next to the Quick Entry box in the WorkflowFirst Designer. When you click that field, there is no way to just freely modify the content; instead, a list appears for you to select a value.
Creating dropdown lists in WorkflowFirst is a simple task.
The easiest way to create a dropdown list is to use the Dropdown Drilldown item under a field definition. It could be the Drilldown Menu (Hamburger icon) or a tab titled "Dropdown". From there you can add the dropdown options, and WorkflowFirst will automatically create a dropdown list to reflect those options.
If you want to add more detail to the dropdown option, such as the internal name to use in scripting or an icon, then click the ( + ) beside the Dropdown option, and enter in more details there:
Sometimes you may want to have a dropdown list that is shared between multiple fields. For example, a week day selector may appear in several places in your application. To do this you will want to create a dropdown list in the Model drilldown, and then select that dropdown in the Dropdown List entry box in the field.
To create the dropdown list, go to the application and select Model in the Drillown menu (Hamburger icon). Once you're on the Model page, select Dropdown Lists from the drilldown menu.
To create the list, click the Create New ( + ) button.
In the Dropdown Lists entry form, you can specify the name of the dropdown list. The limitations of a dropdown list name are similar to those of a field definition, as discussed in Naming Your Field The dropdown list name cannot contain spaces and must start with a letter, just like entering the name of the field. But if you do, WorkflowFirst will take out the spaces.
After entering the name, you can add the members by clicking the + Members button . The dropdown list members are the values that can be selected by the user.
Also, if the Name of your dropdown list member contain spaces or other characters, WorkflowFirst will automatically take them out to create a valid name, and leave the original name to be the title. Remember, the Title can be different to the <Name.
A common dropdown list is task state. Following the step above, lets create one for Task State:
1. Name the dropdown list Task State
2. Add the following members and name each one:
- Progress
- Deferred
- Complete
- Not Started
This is what the Task State dropdown list looks like:
The order of the members on the screen is the order of how they will be shown to the user in the list. You can change the order of the members by using the clipboard operations, Pick Up a member, and then Drop Above to position it above another record.
Tip : When you sort a record list by a field that is a dropdown, it will use the order of the members to determine the order of the list.
You can then use this dropdown list anywhere in the data model.
To use a dropdown list in a field, go to the field definition, edit it, and in the field called Dropdown List you can select the name of the dropdown list you just created.
You can now publish the application and see how this looks in the form.