Selecting a data source for your dropdown field

Modified 1 month ago

Hasmica C

We currently support two primary data sources from which you can populate your dropdown. You can choose a simple list or fetch values from a specific dataset field to load data to the dropdown. If you are unsure to decide which option to choose, this article might come in handy for you.

What is a list?

A List is a simple one-column table with a set of values in it. For example, a Country list would look like the following:

When do you refer to a list in a dropdown?

You can load data from a list when you want the values in the dropdown to stay unchanged or static. We recommend you go for a list only when your requirement is very simple and straightforward like populating a dropdown of Primary colors(Red, Yellow, Blue), or Employment type(Full-time, Part-time, Contract), etc.,

If you think otherwise and feel you might want to create dependent dropdowns where you can limit the values displayed in one dropdown based on your selection in another dropdown, you have to choose a dataset as the data source of the dropdown field. Learn more about dependent dropdowns here.

What is a dataset?

A dataset is where your data can be stored as rows and columns in a tabular format. It is a multi-row, multi-column table unlike a list. A typical dataset would look like the following:

When do you load data from a dataset in a dropdown?

You can load the data from a specific field in a dataset onto your dropdown when you would like to create or use multiple dropdowns that are dependent on each other based on their field values. i.e. You can choose the data source as a dataset when you would like to apply filter conditions and link the dropdown with another dropdown until you achieve your desired results.

Also, you wouldn't be able to apply filter conditions on a list so we recommend you go for a dataset when you have certain conditions to be met and dropdown values must be limited from display based on your filter conditions accordingly.

What is a dependent dropdown?

A dependent dropdown is a dropdown whose values are limited or affected based on the field selected in another dropdown or any other relevant field. They can be a series of dropdowns dependent on each other that lets you access the refined data based on your filter criteria.

Here are a few examples:

  • A list of states that depends on the country selected
  • A list of courses that depends on the college chosen
  • A list of starters that depends on the cuisine preferred

Let us assume Green&Fresh is a farm-produce delivery firm who uses Kissflow for their inventory management. The following table is an example of how their master dataset looks like:

Dataset name: Produce Master Jan 2022

Produce type

Item type

Item name

Seasonal

Vegetable

Green peas

Seasonal

Fruit

Guava

Seasonal

Fruit

Custard Apple

Organic

Vegetable

Tomatoes

Organic

Vegetable

Carrots

Exotic

Fruit

Dragon fruit

Exotic

Fruit

Strawberries

Exotic

Greens

Lettuce

Exotic

Greens

Celery

Use case

Let us learn how this firm populates their live ready-to-deliver stock information using dependent dropdowns.

Solution
  1. Create a dropdown Produce to load the different produce types. This is the primary dropdown using which we would be creating dependent dropdowns.
  2. Under Select a data source, click Select a dataset.
  3. Search for the Produce Master Jan 2022 dataset and select the Produce type field. Our first dropdown is ready.
  4. Create another dropdown Item Category to list the different item types. This is the first dependent dropdown.
  5. Select the same dataset and choose the Item type field.
  6. Add a filter condition as follows:
    1. Field

      Operator

      Field/Value

      Name of the field/Enter value

      Produce type

      Equal to

      Field

      Produce

    So, the item types mapped to the selected produce type will be populated in the Item Category
    dropdown.
    For example, if the Produce type is Seasonal, this dropdown will list the values - Fruit, and Vegetables. Otherwise, if the produce type is Exotic, this dropdown will list the options like Fruit, and Greens.
  7. Likewise, create a third dropdown Today's items to list the set of items for the day based on the produce and item type details chosen earlier. This is the second dropdown that's dependent in this context.
  8. Select the same Produce Master Jan 2022 dataset and choose the Item name field.
  9. Add a filter condition as follows:
    1. Field

      Operator

      Field/Value

      Name of the field/Enter value

      Item type

      Equal to

      Field

      Item

      AND

      Produce type

      Equal to

      Field

      Produce

      As we have added two conditions in this filter, this dropdown will display items based on the selected item and produce types chosen from the previous two dropdowns.
      For example, if they want to know what are the items under the category Exotic Greens ("Exotic" from the first dropdown + "Greens" from the second dropdown), this dropdown will list Lettuce and Celery as results.
Do you know you can add filter conditions only when the data source of your dropdown is a dataset?
Yes, you can create dependent dropdowns using datasets and filters only. The List mode helps you to load data only from a static list to your dropdown field so make sure to choose a dataset as the data source for your dropdown whenever you have certain field validations that will impact the dropdown values in your requirement.

Data form as a data source in Apps

Unlike a dataset used in Process, the data source in a dropdown field within an Application is a data form. One can either choose a list or a data form as the data source within the Application.

What is a data form?

In general, a data form allows you to collect and store data. A data form can be used in a dropdown field as a data source. After selecting a particular data form as the data source, the field which holds the required values is chosen. The dropdown field will then list the values entered in the selected field of the data form.

Steps to follow:

  1. In Field properties, under Select a data source, choose Dataform.
  2. Click Select a dataform.
  3. In the popup Select a dataform field, you can select an available dataform or you can create a new dataform.
  4. On selecting the dataform, a list of fields from the dataform will appear.
  5. Select a field that contains the required values.
  6. On selecting the field, the values will be displayed in the Dataform field values table.
  7. Finally, click the Select button to submit.

Did you find the article helpful?

Powered by HelpDocs (opens in a new tab)