1. Home
  2. Lab Management
  3. Using Attributes to Filter Listings on Lab Requests

Using Attributes to Filter Listings on Lab Requests

When configuring lab request templates, you can use attributes to filter list groups based on selections made on a Fixed List entity. In the screen recording below, selecting a recipe from the entity selection dropdown menu automatically filters the lab request listing. Learn more about configuring lab request templates.

Using a Fixed List entity on a lab request to automatically filter a List group

How to Use Attributes to Filter Listings on Lab Requests

To filter a List Group using an entity selection dropdown, take the following steps.

Step 1: Adding a Fixed List Field to the Lab Request Template

In the Fields tab add an existing Fixed List field or create a new one by selecting either:

  • Fixed List – Single: Allows you to select a single entity.
  • Fixed List – Multiple: Allows you to select multiple entities.

Add an Id Source by clicking the pencil icon (A) and select from the following modal tabs (B):

  • Field Options: Allows users to use an entity select dropdown to select from a set of field options, which are pre-configured within the Field Options tab on the Form Admin page.
  • Entity: Allows users to use an entity select dropdown to select from a list of entities (i.e. experiments, ingredients, outputs, notebooks, etc).
  • Custom Entity: Allows users to use an entity select dropdown to select from a list of custom entities.

Within the modal, assign an Id source.

    Step 2: Add an Attribute to the List Group to Reference the Fixed List Entity

    Copy the Fixed List entity reference name (”selectRecipe”) (A).

    Copying the Fixed List entity reference name

    Select the List group entity (B).

    In the Group Settings tab, add an attribute that references the Fixed List entity.

    • Paste the ref name into the Field Ref Names References in Attribute Value Spec field. This instructs the platform on what to look for (C).
    • In the Attribute field, define the attribute by adding a name (”rec”) (D).
    • Access the Attribute Value Spec editor by clicking the pencil icon and reference the field using the format ref:fields.[Fixed List entity reference name] (”ref:fields.selectRecipe”). This defines the attribute, which can then be used to filter the List group (E).
    Configuring field ref names and attributes in the Group Settings tab of the List group
    Using the copied Fixed List entity field reference name to configure the attributes value spec

    In the Constraints tab, add a reference constraint to ensure filters apply correctly (F).

    • Select FieldConstraintReference.
    • In the modal, paste the Fixed List entity reference name into the source_field field.
      Adding a reference constraint to the List group
      Adding a constraint to the List group using the copied Fixed List entity field reference

      Step 3: Using the Attribute to Create a Dynamic Filter

      Access the admin view of the listing by selecting List → Views → (Admin) Configure Defaults. Accessing the (Admin) Configure Defaults view of the listing.

      Accessing the (Admin) Configure Defaults view of the listing

      In the Fixed Filters tab, add a filter using the following configuration:

      • [Fixed List field entity] + Identity + Includes (A)
      • Select the right most selection (B) menu and add a dynamic filter (”f(x)”).
      • Click the pencil icon to access the Value Spec editor (C).
      • Reference the attribute using the format ref:attributes.[attribute name](”ref:attributes.recipes”) (D).
        Adding a reference constraint to the List group

        Results

        On the lab request, using the Entity Select Dropdown will now filter the listing directly.

        Using a Fixed List entity on a lab request to automatically filter a List group
        Updated on February 26, 2025

        Was this article helpful?

        Related Articles