Users can find objects using the SampleDB search. There are two modes for the object search:
A simple text-based search, and
an advanced search using property comparisons
To use the simple search, users can enter words or phrases into the search field and will find all objects containing these.
The advanced search allows a more fine grained search by performing comparisons on objects’ properties and supporting Boolean algebra. Users can enter a query into the search field and select ‘Advanced Search’ in the adjacent dropdown, though using operators like
= will automatically enable the advanced search mode. Another way to perform an advanced search is by clicking on the search icon next to an object’s property that will search for other objects having the same value.
When an advanced search is used, SampleDB will show the search tree that the query has been parsed into, to clearly show which filters were used.
In addition to attribute comparisons, the advanced search also allows searching for objects with files or links with a given name by using the special attribute
".dat" in file_name to find all objects with a file containing
.dat in its name or
file_name == "test.dat" to find all objects with a file named
Search Query Builder¶
Instead of manually writing search queries, you can use the Search Query Builder via Objects ➜ Search ➜ Build Search Query . This allows you to define search conditions, either requiring all or one of them to be met.
To define a condition, enter the name of the property you want to filter for, select the type of the condition and optionally enter any value to compare against, depending on the condition type.
To search for objects which have property fulfilling some condition, the internal name of that property must be known. Property names are set in an action’s schema and the easiest way to find a property is to use the search button shown above. When searching for properties inside an object or array, dots are used as separators and a question mark can be used as wildcard for an array index, e.g.
layers.?.name == "Base Layer".
Boolean properties or comparisons of other properties can be combined with the boolean operators
not is first in the order of operations, followed by
or. For a different order, parentheses can be used.
Text properties can currently be used either for direct comparisons, e.g.
name = "Sample", or by checking whether a property contains a text, e.g.
"MBE" in name.
Quantity properties can be compared using the basic mathematical comparison operators
!=. Comparisons will be performed in the quantities’ base units.
Datetime properties can be compared using the basic mathematical comparison operators or the operators
on. Dates to compare with must be entered using the format
Object or User References¶
To search for references to an object or user ID,
== and != are supported with the ID starting with
operator == #15.
Objects with certain tags can be found using
# and the name of the tag, e.g.