Note: This tutorial only allows you to create new dropdown fields on your 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 dropdown you wish to use. We need to retrieve the "backend" dropdown ID of the dropdown that you would like to use. Once at this page, click on the dropdown you wish to use; in the example below this is Primer Type PCR.
- The dropdown ID will be located in the browser address bar. Make a note of this ID.
In this example, the dropdown ID is z1qsd4oq.
- After you've made a note of the dropdown ID of the desired dropdown list, please click back to the browser tab containing your assay result schema.
Now, you are ready to add your new field. You can do this by copying and pasting an existing field, or by copying the format for the following fields shown in the animation below. DO NOT PRESS UPDATE YET!
Now you can update the JSON directly to change the type to dropdown.
- In the JSON Spec Box please scroll to the line of code containing the field that you would like to make a dropdown data type.
- In the "type" line, please replace "text" with "dropdown" and under that line, please add the following characters: "dropdownId": "sfs_DROPDOWNID" (animation below). Be sure to add the comma after the dropdown ID line if you are getting an error.
- Click "Update" to update the type. You should see your dropdown options populate in the JSON.
- 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.