Use data from Google Sheets in dependent dropdown

Hi. I am looking to build dependent dropdowns that are getting data from Google Sheets using the API.

What I want to build is described here:

I have a Google Sheets table that looks like this:

I want to make two dependent dropdowns:

  1. One that has only unique strings from the column “Defect type.”
  2. Dependent on the first dropdown selection, it displays only strings from the “Defect name” column that match with the selected Defect type from the previous dropdown.

The illustration of my dropdown use idea:

The output settings of the Google Sheets Connector are following:
image

The output (some of them) of the Google Sheets Connector:


Questions:

  1. How to filter out the first row (in this case, the “Defect type”)?

  2. How to have only unique values in this dropdown?
    image

  3. How to display only the Defect names that match with a selection from the previous dropdown list?

hello @Andres, great questions!! just to confirm, is there a reason why the defect data needs to live in Google Sheets?? if you could upload it via CSV to a Tulip Table it would make interacting with it a lot simpler, just a suggestion!! here’s how to import if you’re interested in it: How to Import a Spreadsheet into a Table | Tulip Help Center - Support for Building Manufacturing Apps

but to answer your questions:

  1. if the list will not be changing in your Google Sheet, you could point to the various defect types and create an Array out of those:


    note the .values.1.0 and .values.5.0:

    creating the array:

  2. will be solved if the above solution works

  3. have you looked into creating a filter on the Google Sheet and adding that as a parameter when running the connector function?? I haven’t tried implementing it, but something like this could be a good solution: Filters  |  Sheets API  |  Google Developers. let us know if you’re able to implement it!!