ecl-logo Documentation

Search

Search[types]objects

returns all objects of the given types.

Search[types, conditions]objects

returns objects of the given types which satisfy the specified conditions.

Search[typesList]objectsLists

returns a list of all the objects for each list of types in typesList.

Search[typesList, conditionsList]objects

returns a list of objects for each set of types/condition pair.

Details

  • The conditions given to Search must be a boolean logical expression constructed using field names and various conditional operators (such as '&&', '||') and comparison operators (such as '!=', '==', '>', '<', '>=', '<=').
  • When using the Alternatives syntax `|` in Search, parentheses must enclose the Alternatives. For example, Status==(InUse|Available).
  • By default, if the DeveloperObject field is not specified as a condition, Search will only return objects which have DeveloperObject!=True.
  • When lists of types or conditions are specified, the lengths of the lists must match.
  • Input
    Output
    General Options
    Attributes
  • HoldRest
  • Messages
  • AlternativesWhen using Alternatives in an equality it must be wrapped in parentheses. For example, Field==(A|B).
    AmbiguousTypeUnable to search using the value `1` due to an ambiguity in the resulting field class after searching through links.
    CloudFileFieldThe fields `1` in types `2` cannot be searched because searching on EmeraldCloudFiles is not currently supported. Please try restructuring your search to use different fields.
    ComputableFieldThe fields `1` in types `2` cannot be searched on because they are live computed and not stored. Please try restructuring your search to use different fields.
    Error`1`
    InvalidFieldThe fields `1` in types `2` are not valid fields for searching.
    InvalidSearchQueryThe query does not have a valid form. Please check that your search conditions are only field names and expressions such as &&, ||, |, ==, !=, <, >, <=, >=, Field, and Part.
    InvalidSearchValuesThe query has the follow invalid values in its conditions: `1`.
    MapThreadThe provided lengths of types `1` and queries `2` are unequal.
    MissingFieldThe fields `1` in types `2` do not exist.
    MissingTypeThe following types do not exist: `1`.
    NotebooksLengthThe provided lengths of types `1` and Notebooks `2` are unequal. Please update your request and try again.
    OptionLengthThe length of option `1` (`2`) does not match the length of the inputs (`3`).
    PublicObjectsLengthThe provided lengths of types `1` and PublicObjects `2` are unequal. Please update your request and try again.

Examples

Basic Examples  (5)

Find all objects of a type:

Find all objects of a type that meet the given criteria:

Find all objects of multiple types:

Find all objects of multiple sets of types. The objects will be separated to match the way the types were separated in the input:

Apply search criteria using searching through links:

Additional Examples  (54)

Searching a super-type searches across all its sub-types :

Searching for an empty list of types returns an empty list:

Search with comparison and conditional operators like equality and greater than:

Apply multiple search criteria to the same field:

Search for objects that are linked to a specific object as given by ID:

Search for objects that are linked to a specific object as given by Name:

Search respects timeless objects. (The original value at historical time was 1 degree Celsius):

Search respects timeless object through links. (The original value at historical time was 1 degree Celsius):

Alternatives  (2)

Use '|' (alternatives) in the search conditions. Note that parentheses must be used around the alternatives when the `|` syntax is used:

Usage of 'Alternatives' is equivalent to '|':

Any/All/Exactly  (5)

Multiple fields can be searched using the Any syntax. In the following example, stock solutions will be returned which are incompatible with CarbonSteel:

Multiple fields can be searched using the Any syntax. In the following example, stock solutions will be returned which have a component under 1 Micromolar:

Multiple fields can be searched using the Exactly syntax. In the following example, stock solutions with this exact set of Incompatible Materials (with the order taken into account):

Multiple fields can be searched using the All syntax. In the following example, samples will be returned whose incompatible materials are all Polyurethane:

Any syntax can be used to search on indexed multiple fields:

Field  (3)

Fields can be held with the Field head to prevent early evaluation when using Length. (This is useful when the field is passed as a variable to Search.):

Fields can be held with the Field head to prevent early evaluation when using Part. (This is useful when the field is passed as a variable to Search.):

The Field head can be used in a subset of search conditions:

Length  (3)

Search for objects with a multiple field that is a specific length:

Search for objects with a multiple field that is a specific length using search through links:

Searching for a field with a length of zero or a value of Null is identical:

MapThread  (4)

Search for multiple sets of types at once:

Search multiple sets of types at once with the same search criteria:

Search multiple sets of types at once with different criteria for each set:

Search with a different criteria for each type:

Max  (1)

Search for the objects that have the maximum value for a given numerical field:

Min  (1)

Search for the objects that have the minimum value for a given numerical field:

Operations on Multiple Fields  (5)

Search on specific indexes of an indexed multiple field:

Search on specific named indexes of a named multiple field:

Search on specific indexes of a named multiple field:

Search through links on specific indexes of an indexed multiple field:

Search through links on specific indexes of a named multiple field:

Operators  (16)

Use '==' (equal) in the search conditions:

Usage of '===' is equivalent to '==':

Usage of 'Equal' is equivalent to '==':

Use '!=' (unequal) in the search conditions:

Use '>' (greater than) in the search conditions:

Usage of 'Greater' is equivalent to '>':

Use '<' (less than) in the search conditions:

Usage of 'Less' is equivalent to '<':

Use '>=' (greater or equal to) in the search conditions:

Usage of 'GreaterEqual' is equivalent to '>=':

Use '<=' (less or equal to) in the search conditions:

Usage of 'LessEqual' is equivalent to '<=':

Use '&&' (and) in the search conditions:

Usage of 'And' is equivalent to '&&':

Use '||' (or) in the search conditions:

Usage of 'Or' is equivalent to '||':

Strings  (4)

Search for objects where a string field starts with a specific string (by default, is case sensitive):

Search for objects where a string field starts with a specific string (case insensitive):

Search for objects where a string field contains a specific string:

Search for objects where a string field ends with a specific string:

VariableUnit  (2)

Quantities with different units can be searched for in VariableUnit fields:

Quantities with different units can be searched for in VariableUnit fields:

Options  (8)

Date  (1)

Find all objects of a type that existed at the time of the provided timestamp:

IgnoreTime  (1)

Search with IgnoreTime returns the latest value:

MaxResults  (2)

Limits the results to the number specified:

Limits the results of multiple queries to different lengths:

Notebooks  (1)

Limits search to the given list of laboratory notebooks:

PublicObjects  (1)

Allows inclusion or exclusion of public notebooks when specifying notebooks to search on:

SubTypes  (2)

When SubTypes is true, the given type and all of its subtypes are searched:

When SubTypes is false, only the given type and none of its subtypes are searched:

Attributes  (1)

HoldRest  (1)

Search has the HoldRest attribute, so Mathematica syntax like Part works differently:

Messages  (16)

Alternatives  (1)

The Alternatives syntax `|` must be wrapped in parentheses:

AmbiguousType  (1)

Ambiguous Type Message:

CloudFileField  (1)

Cloud file fields cannot be searched:

ComputableField  (1)

Computable fields cannot be searched:

Error  (1)

Search errors happen on things like network problems:

InvalidField  (1)

Compressed fields cannot be searched:

InvalidSearchQuery  (1)

Fails if no valid conditions are supplied:

InvalidSearchValues  (2)

Fails if values are not valid search values:

When searching with StringExpressions, the value must be strings or ___:

MapThread  (1)

The length of the search conditions list must be the same as the length of the types list:

MissingField  (1)

The fields being searched for must exist in the type:

MissingType  (2)

Returns $Failed if type does not exist:

Returns $Failed if any of the given types do not exist:

NotLoggedIn  (1)

Returns $Failed and throws a message if you are not logged in:

OptionLength  (2)

Returns $Failed if MaxResults is a list that does not match the length of the inputs:

Returns $Failed if SubTypes is a list and input arguments are not: