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: NotStarted, InProgress, QualityCheck, Returned, Completed, and Skipped.

For a custom workflow, the values depend on the statuses that exist within it.

approvalStatus

true, false, and null.

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 YYYY-MM-DD.

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 Action

For the lastAction parameter, 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.

👍

Examples

To search items with the QualityCheck status:

metadata(status = QualityCheck )

To search items with the InProgress status 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.

👍

Examples

To filter items where Annotator is John Smith:

assignment.Annotator(name = John Smith)

To filter items where QA role is unassigned or any role assignee is paused:

assignment.QA(email = none) OR assignment(isPaused = true )

To filter items where QA assignee name contains John and Audit assignee has pending state:

assignment.QA(name CONTAINS John) AND assignment.Audit(isPending = true )

Note that, ROLE corresponds 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

input

Filters the value of input components in the item.

Queries for this component are case-insensitive when used with the CONTAINS operator.

You can use inputLength instead to query the number of characters in an input component. You may also use inputLength.ID where ID is the specific component's ID.

textarea

Filters the value of input components in the item.

Queries for this component are case-insensitive when used with the CONTAINS operator.

You can use textareaLength instead to query the number of characters in an textarea component. You may also use textareaLength.ID where ID is the specific component's ID.

number

Value is a manual input after an operator is selected.

slider

Value is a manual input after an operator is selected.

radio

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.

checkbox

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.

rating

Value is a manual input after an operator is selected.

voting

true, false, and null.

select

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.

datetime

The value is a date with this format YYYY-MM-DD.

code

Filters the value of input components in the item.

Queries for this component are case-insensitive when used with the CONTAINS operator.

You can use codeLength instead to query the number of characters in an code component. You may also use codeLength.ID where ID is the specific component's ID.

paragraph

Filters the value of input components in the item.

Queries for this component are case-insensitive when used with the CONTAINS operator.

You can use paragraphLength instead to query the number of characters in an paragraph component. You may also use paragraphLength.ID where ID is the specific component's ID.

markdown

Filters the value of input components in the item.

Queries for this component are case-insensitive when used with the CONTAINS operator.

You can use markdownLength instead to query the number of characters in an markdown component. You may also use markdownLength.ID where ID is the specific component's ID.

csv

Value is a manual input.

Queries for this component are case-insensitive when used with the CONTAINS operator.

When querying with the = or != operators, you must use the exact expression that’s used in the JSON file. For example: cell1_text,cell2_text,,\r\n,,,\r\n,,,\r\n,,,

web_[COMPONENT_ID]

Value is a manual input after an operator is selected and a key name is given.

For example, if your key has a Number value type:

[KEY_NAME] >= 10

This query will also detect keys that are an array of values that contain the specified value (for example, [1, 4, 7, 10]).

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.

👍

Examples

To search for items that have a rating of 3 stars or higher for any parameter and are voted Approved:

rating >= 3 AND voting = true

To 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 is completion.

rating.prompt >= 3 AND voting.completion = true

To search for items that are marked 'Complete' for model 1 and 'Incomplete' for model 2. In this case, there are two radio components with the model1 and model2 IDs.

radio.model1 = Complete AND radio.model2 = Incomplete

To search for items whose completion contains the word 'software' and correction contains SaaS. In this case, there are two textarea components with the completion and correction IDs.

textarea.completion CONTAINS software AND textarea.correction CONTAINS SaaS

📘

Comparative querying

After 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-array datetime key)
    • Supported operators: =, !=, >=, <=, >, <

Here are some example queries that you can try:

👍

Examples

To search for items where completion and prompt ratings are equal:

rating.completion = rating.prompt

To search for items approvalDate earlier than reviewDate(both are datetime component 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 groups

When 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 ID AnswerInput. Let's assume you want to find the components that contain the word Red. Your query should look something like this:

group.firstGroup(input.AnswerInput CONTAINS Red)

You may use the AND operator to include multiple parameters at a time. For example, you have a Checkbox component you want to include, with the CheckboxResponse ID. In this case, you're looking for a group component that has both a Text Input component whose value contains the word Red, and a Checkbox component whose value equals to Option 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 OR operator 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 commentCount to see how many comments an item has.

You can use comment.ID to specify which comment you want to query.

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.

📘

Usage

These are the queries on the same level as the Metadata query, each with their own nested parameters.

👍

Examples

To 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.

AND

Returns items where both statements are true.

OR

Returns items where either statement is true.

IN

Set of values to consider.

NOT IN

Set of values to not consider.

CONTAINS

Used to search for a substring and returns the results containing that substring. All text queries made with this operator are case-insensitive.

NOT CONTAINS

Used to search for results that exclude the entered substring. All text queries made with this operator are case-insensitive.

This operator only works for the following component parameters: input, textarea, code, markdown, paragraph, and web (string-type keys)

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.

👍

Examples

Say 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 ASC

Another 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 use orderBy as a sole query

Please note that you can't use the orderBy query 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 as metadata or commentCount, so that you can add an additional parameter to sort your items with.