Introduction to Benchling Fieldsets

Corinne
Corinne
  • Updated

Fieldsets are a data modeling concept that allows you to improve the way you model your science using schemas in Benchling. Fieldsets are specifically designed to help you model rich and varied scientific data relationships in the Registry. 

 

Overview

Fieldsets define the structural constraints that can be enforced on one or more schemas to improve governance across your data model. For example, Fieldsets allows you to refine how links are used to improve data quality. Fieldsets have the ability to be used as Categories. Categories represent the group of schemas that apply a Fieldset. The category name is always the same as the Fieldset’s name. For example, if two different schemas called X and Y exist, a Fieldset can be created that groups schemas X and Y in a category called Z. Both X and Y can be referred to as type Z. Users within your organization will be able to interact with the Fieldset category just like they would any other schema.

When configuring lookup columns or snapshot fields that traverse a Fieldset, users will see an option to Restrict to Schema or Type-cast the link. Restricting the lookup through a specific schema type means the link will only traverse those schema entities rather than any schema in the Fieldset. This provides value because you can hoist any field value defined in the schema and not just the Fieldset field values.

Type-casting is helpful when you need a lookup field to find metadata that is specific to a schema and is not configured on the Fieldset. If you decide to type-cast a link, all schema specific metadata will be available to continue your lookup. If you type-cast a link but the lookup finds an Entity that is not part of the schema that the lookup is restricted to, no value will be returned. If you leave the Restrict to schema dropdown blank, you will only be presented with metadata fields that are enforced by the Fieldset.

 

Terminology

Fieldsets: Registry functionality specifically designed for modeling rich and varied scientific data relationships. Fieldsets are an excellent tool to use when you have different Registry schemas that share the same behavior. Fieldsets give admins the ability to enforce a variety of attributes across schemas including Entity Type, Prefix, Name templates, Constraint, Entity Fields, and Registration Options.

Categories / Category Links: Fieldsets introduces a new way to define an Entity link. A Fieldset creates a grouping for all Schemas that apply the Fieldset. This grouping is referred to as a Category when you define the Entity link. Therefore, you can configure a Category Link on a schema which will only accept entities that belong to a schema that applies the specific Fieldset.

Type-casting / Restrict to schema: In Fieldsets, type-casting is an option applied when configuring lookup columns and snapshot fields which restricts the lookup to a specific schema type. This means the link will only traverse those schema entities rather than any schema in the Fieldset.

 

Fieldset Use Case

The data model below shows one way that you may have created linkages between schemas without using Fieldsets. This data model shows how Cell Line A and Cell Line B schemas can be linked to the Cell Line Batch schema through entity links.  

Screenshot 2025-02-20 at 8.32.52 AM.png

However, looking deeper at the data model, you might notice: 

  • The first two fields of Cell Line A and Cell Line B are tracking the same information, but they are using different names and definitions. 
  • In the Cell Line Batch schema, there are optional entity link fields to either Cell Line A or Cell Line B to allow data entry for both entities. Users are meant to enter either a value for Cell Line A or Cell Line B, however, this can not be made required and is thus not enforceable. Therefore, this setup increases the likelihood that no entity is entered into the Cell Line A or Cell Line B fields.

Using a Fieldset will allow this data model to maintain links between the two Cell Line schemas and the Cell Line Batch schema and enforce the desired data entry.

 

Applying a Fieldset

A good starting point for creating a Fieldset is assessing the fields that overlap between schemas. Recall from the data model above that the first two fields of Cell Line A and Cell Line B are tracking the same information but are using different names and definitions. Use these overlapping fields and standardize the names and definitions to create a Fieldset.  

The image below shows how you could apply a Fieldset to the data model from above. The Cell Line Fieldset holds the common fields required by the Cell Line A and Cell Line B schemas. The Cell Line A and Cell Line B schemas apply the Fieldset to ensure data consistency for the defined fields while retaining the fields that are unique to each schema.

Creating a Fieldset and applying it to multiple schemas enables the use of Category links as a way to link schemas. In this example, the Category link allows you to require that data about a Cell Line entity be entered in the Cell Line Batch schema. 

 

 

In this way, Cell Line A and Cell Line B schemas are linked to the Cell Line Batch schema, but rather than having multiple, optional entity link fields, Fieldsets allows this to be done with a single required entity link. In this data model, users will be required to enter either a Cell Line A entity or a Cell Line B entity when registering a new Cell Line Batch. 

NoteEntity link fields defined with a Category cannot be set as Parent links. 

Was this article helpful?

Have more questions? Submit a request