Note: This tutorial only allows you to restrict input samples on new Assay Result Schemas. If you have an existing field in a result table that can't be edited, you will need to archive that field and create a new one using this tutorial.
- Open a separate tab in your browser and navigate to the settings page of the Entity Schema you wish to use. We need to retrieve the "backend" Schema API ID that you would like to use. To get there navigate to your Entity. Once at this page, extract the Schema API ID that you would like to use
- The Schema API ID will be located in the browser address bar. Entity Schema API IDs begin with the prefix ts. Batch Schema API IDs begin with the prefix batsch. Make a note of this ID.
In this example, the Entity API ID is ts_PLIIFLgA.
Now you can update the JSON directly to add your schema restriction.
- In the JSON Spec Box please scroll to the line of code containing your Entity link. This is usually called "entity" or "batch".
- Add the following argument to that field: "schemaId": "Schema API ID" as per the animation below. Note: you may need to add a comma after your argument
- Click "Update" to update your entity link.
- Click on the "Configure Result Table" button and click "Publish" to publish your result table. This will lock your fields for editing, so please ensure that your Result Table is final before publishing.
If you are getting errors, ensure:
- All fields except for your last field should have a comma after the final }.
- All of your field attributes ("isMulti", "type", "displayName", "name", "dropdownId", etc.) should have a comma at the end of each line, except for the final attribute.
- If you are getting an error similar to "fields.FIELDNAME.FIELDTYPE cannot change type once data has been received", this means you can not change the field type since it is already in use. To change this, you will need to archive this field and create a new one using the steps outlined above.
Note: Batches are legacy feature. While visible in the UI, the creation of new batch schemas will no longer be available. As child entities offer more functionality than their batch counterparts, Benchling recommends using child entities instead of batches.
If you are using Batch Schemas, please follow the same steps listed above.