Multimodal Queries
When you’re in the Explore tab, you'll see a query search bar above your items. This bar uses a custom SuperAnnotate query language to filter items with a range of parameters (e.g. item status, metadata, assignment, individual component values etc.). You can also combine multiple statements with logical operators such as AND and OR.
The query language and examples on this page are unique to the Multimodal project type.
When you've built a query, if you want to reuse it in the future, you can save it for convenience.
Metadata
The item's metadata information can be filtered using the metadata field, and any of its applicable nested parameters. Here are the nested parameters available:
Parameters | Value |
|---|---|
status | For system workflows: For a custom workflow, the values depend on the statuses that exist within it. |
approvalStatus |
|
lastAction.email | The value is the email address of the user who updated the item last. |
lastAction.timestamp | The value is a date with this format |
name | The value is the item's name. |
priority | The value is numeric. This is the priority score given to the item. |
category | The value is the category name. |
Last ActionFor the
lastActionparameter, updates only count when they change the item's JSON in any way. This doesn't include things like item annotation or assignments, or approval status changes.
ExamplesTo search items with the
QualityCheckstatus:
metadata(status = QualityCheck )To search items with the
InProgressstatus that are disapproved:
metadata(status = InProgress AND approvalStatus = false )
Assignment
The assignment can be used to filter items assigned to users by role, email, name, activity status or whether their status as a member is pending.
ExamplesTo filter items where
AnnotatorisJohn Smith:
assignment.Annotator(name = John Smith)To filter items where
QArole is unassigned or any role assignee ispaused:
assignment.QA(email = none) OR assignment(isPaused = true )To filter items where
QAassignee name contains John andAuditassignee has pending state:
assignment.QA(name CONTAINS John) AND assignment.Audit(isPending = true )Note that,
ROLEcorresponds to a existing role in your project's workflow.
Component fields
These are the fields that correspond to the component types that exist within your form. They can be differentiated by using each component's individual ID after the component type, for example:
number.calculation where number is the component type, and calculation is the specific component's ID.
A component's type and ID can be seen when viewing the item in:
- List View - When hovering over the column name of a component's ID.
- Zoom View - When hovering over a component.
You can also exclude the component's ID if you want to query all components of the same type.
Parameters | Value |
|---|---|
| Filters the value of input components in the item. Queries for this component are case-insensitive when used with the You can use |
| Filters the value of input components in the item. Queries for this component are case-insensitive when used with the You can use |
| Value is a manual input after an operator is selected. |
| Value is a manual input after an operator is selected. |
| All radio options will be auto-suggested after entering this parameter. If you include a component’s ID in the query, only options belonging to that ID will be shown. Value can either be a selected option, or a manual input. |
| All checkbox options will be auto-suggested after entering this parameter. If you include a component’s ID in the query, only options belonging to that ID will be shown. Value can either be a selected option, or a manual input. |
| Value is a manual input after an operator is selected. |
|
|
| All select options (except dynamic) will be auto-suggested after entering this parameter. Querying for static options will display a dropdown of existing options in the component. Querying for dynamic options will require a free text input. If you include a component’s ID in the query, only static options belonging to that ID will be shown. Value can either be a selected option, or a manual input. |
| The value is a date with this format |
| Filters the value of input components in the item. Queries for this component are case-insensitive when used with the You can use |
| Filters the value of input components in the item. Queries for this component are case-insensitive when used with the You can use |
| Filters the value of input components in the item. Queries for this component are case-insensitive when used with the You can use |
| Value is a manual input. Queries for this component are case-insensitive when used with the When querying with the |
| Value is a manual input after an operator is selected and a key name is given. For example, if your key has a
This query will also detect keys that are an array of values that contain the specified value (for example, IDs of Web components that don’t contain any keys won’t be shown. |
If you want to query components that don’t have a value entered or selected, you can use the value of none.
ExamplesTo search for items that have a rating of 3 stars or higher for any parameter and are voted
Approved:
rating >= 3 AND voting = trueTo search for items that have a rating of 3 stars or higher for prompt and whose completion is voted Approved. In this case, the needed rating component's ID is
prompt, and the voting component's ID iscompletion.
rating.prompt >= 3 AND voting.completion = trueTo search for items that are marked '
Complete' for model 1 and 'Incomplete' for model 2. In this case, there are two radio components with themodel1andmodel2IDs.
radio.model1 = Complete AND radio.model2 = IncompleteTo search for items whose completion contains the word 'software' and correction contains
SaaS. In this case, there are two textarea components with thecompletionandcorrectionIDs.
textarea.completion CONTAINS software AND textarea.correction CONTAINS SaaS
Comparative queryingAfter using an operator and any values you want to filter by, you can also incorporate component IDs to compare values between two components. You can only compare values if they share a value type. Here are the value types, and which components they correspond to:
- Numeric -
number,slider,rating,scores,web(non-array numeric value)
- Supported operators:
=,!=,>=,<=,>,<- Selective -
select(single select only),radio
- Supported operators:
=,!=- Date -
datetime,web(non-arraydatetimekey)
- Supported operators:
=,!=,>=,<=,>,<
Here are some example queries that you can try:
ExamplesTo search for items where
completionandpromptratings are equal:
rating.completion = rating.promptTo search for items
approvalDateearlier thanreviewDate(both aredatetimecomponent value):
datetime.approvalDate < datetime.reviewDate
Group field
The Group field filters all Group components used in the project by their unique IDs or any component types that exist within a group in the project. The query can also contain additional, more particular conditions to narrow down your search.
group.GROUP_ID.(CHILD_COMPONENT_TYPE.CHILD_COMPONENT_ID)
Querying groupsWhen querying groups, you can specify a group component by its ID, and the types and IDs of its child components. For instance, say you have a group with the ID
firstGroup, and within that group you have a Text Input component with the IDAnswerInput. Let's assume you want to find the components that contain the wordRed. Your query should look something like this:
group.firstGroup(input.AnswerInput CONTAINS Red)You may use the
ANDoperator to include multiple parameters at a time. For example, you have a Checkbox component you want to include, with theCheckboxResponseID. In this case, you're looking for a group component that has both a Text Input component whose value contains the wordRed, and a Checkbox component whose value equals toOption 1. Your query should look something like this:
group.firstGroup(input.AnswerInput CONTAINS Red AND checkbox.CheckboxResponse = Option 1)To search for a group that contains either of these components, you can use the
ORoperator instead.
groupCount
To query your items by the number of group repetitions, you can use the groupCount query.
To search for items where the group is repeated over 3 times (in this case, the group component ID is Answer): groupCount.Answer > 3
To search for items where groups with a rating of 5 are repeated more than 3 times (in this case, the group component ID is Answer and it has a rating component within it): groupCount.Answer(rating=5) > 3
Additional fields
Field | Value |
|---|---|
comment | Value is a manual input after an operator is selected. You may filter by resolved or unresolved comments, or filter them by text. You can also use You can use |
folderName | The value is the folder's name. |
folderStatus | The value is the folder's status. |
subsetName | The value is the subset’s name. |
random | Numeric value. |
UsageThese are the queries on the same level as the
Metadataquery, each with their own nested parameters.
ExamplesTo search items in 3 selected folder which have unresolved comments on completion text.
folderName IN [f1, f2, root, ] AND comment.completion(resolved = false )
Operators
You'll need to use operators to define your queries and values.
Operator | Description |
|---|---|
| Equal. |
| Not equal. |
| Greater than. |
| Less than. |
| Greater than or equal to. |
| Less than or equal to. |
| Query parentheses. |
| Array. |
| Returns items where both statements are true. |
| Returns items where either statement is true. |
| Set of values to consider. |
| Set of values to not consider. |
| Used to search for a substring and returns the results containing that substring. All text queries made with this operator are case-insensitive. |
| Used to search for results that exclude the entered substring. All text queries made with this operator are case-insensitive. |
Sort by query
With the use of the query bar, you can manually specify the data you want to order your item by. You can do so by using orderBy. After typing it in the bar, you must then select one of the following parameters to specify the ordering. let's delete the table, just list the in a sentence, this is too obvious.
You can set the order based on the item metadata name, status, lastAction.date, and priority.
ExamplesSay you want to sort the items that haven't been worked on by name, in ascending order. You can use the following query:
metadata(status = NotStarted) orderBy metadata.name ASCAnother example is to sort the items that have been marked for Quality Check based on the date of the last action taken, in descending order:
metadata(status = QualityCheck) orderBy metadata.lastAction.date DESC
You can't useorderByas a sole queryPlease note that you can't use the
orderByquery on its own (e.g.orderBy metadata.status ASC). Think of it as a secondary attachment to the overall query; it must follow a general query, such asmetadataorcommentCount, so that you can add an additional parameter to sort your items with.
Updated 7 days ago