Adding Questions
Last updated
Was this helpful?
Last updated
Was this helpful?
In Publisher, select the desired collection in the Collections tab in the sidebar. Click on the tab in the Collection and scroll down to the Questions section below the Download section. Click on "New Question" to start defining a new query.
Fill in the Question Name
and Description
.
The query will allow you to join tables from your collection, retrieve data, and apply filters using variables. Tables and their schema will be displayed in the left sidebar.
In the SQL editor, write a SQL query that pulls data from the necessary tables. Use JOIN to link related tables as needed.
The sidebar to the right of your Query window should automatically populate with new variables.
If this does not occur, please edit the SQL query to retype any variables in {{ }} format.
Define variables in the WHERE clause to make your query dynamic. For example:
Here, {{sex}} is a variable that will be entered by the researcher when they run the query.
In the Variables panel on the right, create and configure the variables used in your SQL query.
Name
: The identifier for the variable matching the SQL query (e.g. sex).
Label
: The display name that researchers will see in Explorer when entering values.
Type
: Data type of the field (e.g. boolean, decimal, datetime, integer, string).
Input Type
: Specify the type of input (e.g. text, dropdown).
Default Value
(optional): Specify the default value of the variable that gets applied to the SQL.
Description
(optional): Add a description to guide researchers on how to use this variable.
Once this is filled in, you can test your query.
Click the "Test Query" button above the query window.
If the results window displays an error message: Please double-check the SQL statement and the variables in the sidebar to resolve any issues. If the errors persist, copy the error message or take a screenshot and contact DNAstack for support.
If the results window shows no errors: Click "Save" to preserve your work, even if the query is incomplete. You can always edit the question later to continue building or refining the query.
Note: If you do not save the question and an unexpected issue or session timeout occurs, you may lose all the progress made. Saving frequently is a best practice to avoid this.
Once the question is tested and saved, navigate to the Sharing tab of your collection and scroll down to the Questions section.
“Public” allows any researcher who accesses your Network to ask the question.
“Registered” only permits other researchers within your Network who have created accounts to ask the question.
Once your access policy is selected, click “Save.”
To confirm that the question has been successfully applied to your collection, perform the following steps:
Click the collection card representing your collection
Confirm that a new tab with the previously defined name for the question has been added to your collection.
Click on the tab, add inputs, and submit the question.
In the dropdown, admins can select from a variety of access permissions:
Alternatively, admins may also select from any additional that were in your Network.
Go to your site (e.g. )