Skip to main content
You are here: Data Management

Create Dependent Dropdown

Overview

Once you have a data table created in Mirata, you can create queries to grab subsets of that dataset. These queries can be used to bring data into Mirata forms.

To demonstrate how to do this, we’ll walk through how to set up an example use case in this article. Let’s say your use case is: You have a data table (List Numbers by Region in this exmaple) that holds all viable line number / region pairs (below screenshot). You’re building a form in which the technician will provide what region they’re doing the work in and then they need to select a viable line number based on that region. So, if they select that they’re working in the South region, then they select either 20, 4000, or 1 as the line number

Building the Data Table Query

Create an Integration Action

First, create an integration action to query your data table.

  1. Go to Integration Actions in the Admin Tool

  2. Click +ADD INTEGRATION ACTION

  3. Enter a descriptive name for the integration action (this is how form designers will find it)

  4. For Action Request Type, select Data Table Request

  5. Click SAVE

Configure and Build the Query

Next, we will need to to add an Input Parameter for Region.

  1. Navigate to the INPUTS tab

  2. Select + ADD

  3. For Name, set it to the column you are querying off of (in this case, it will be Region)

  4. For Type, set it to match your column in the CSV

  5. Click SAVE

Once the Input Parameter has been created, we can create the request and select the data table we will be querying.

  1. Navigate to the REQUEST Tab

  2. Select the Data Table

  3. Request type will be Query

  4. Under Query Parameters, select the +

  5. Select Region

  6. Within the Where statement:

    1. Change Constant to Input Parameter

    2. Under Select a Parameter, select Region

Test the Query

Now test the query

  • Go to the TEST tab

  • Enter a sample value for your input parameter (e.g., "South" for "Region")

  • Click RUN TEST. Verify that the results are as expected. Testing ensures the query functions correctly before integrating it into your form.

Setting up the Dropdowns in your form

Configure the Dropdowns

Add two dropdown components to your form canvas: one for the region and one for the line number. Configure their names and labels accordingly.

  1. For the Region dropdown, in the Data tab:

    1. Select Reference Table as the Source Type

    2. Set Return, Display, and Sort By as Region

  1. For the Line Number dropdown in the Data tab:

    1. Select Query Table as the Source Type

    2. Select Get Line Numbers by Region as your Query

    3. Return, SortOrder, and Display will be set to LineNumber

    4. Under PARAMETERS set the key to Region (the PARAMETERS section will appear if the Integration Action has Input Parameters)

      1. Select the pencil next to Default and create a calculation to call on the Region dropdown in the form to connect the input parameter with the field.

Testing in Preview Mode

Once we go to Preview Mode, we can see that once you select a Region the dropdown options should display the Line Numbers only associated with their corresponding region.