Skip to content

Dropdowns

Below is an example of a dropdown schema defined in code. The __benchling_name__ property is used to define the name of the dropdown in Benchling, while the __allowed_values__ property is used to define the values of the dropdown.

# Example dropdown definition
from liminal.base.base_dropdown import BaseDropdown


class Toppings(BaseDropdown):
    __benchling_name__ = "Toppings"
    __allowed_values__ = ["Pepperoni", "Mushroom", "Onion", "Sausage", "Bacon"]

Tip

Liminal automatically detects the order of your dropdown values. To change the order of how the values appear in Benchling, define the dropdown values in the desired sequence.

Parameters

  • benchling_name: str

    The name of the dropdown in Benchling. There can be no duplicate dropdown names in Benchling.

  • allowed_values: list[str]

    The list of values for the dropdown. Order matters and reflects the order of the dropdown in Benchling. Values must be unique.