Skip to main content
Use the three available search methods to search for records. All three methods can be performed at either the Session, Database, or Table levels:
  • Simple text search
  • Record name search
  • Criteria search

Connect to MI

Search for records which contain the string anywhere in the record.
Previous cell output:
Search for records by name. Only exact matches to the long or short name of a record are returned.
Previous cell output:

Criteria searches

Search criteria are constructed from AttributeDefinition objects using the search_criterion() method. This search type is typically used in 7 different scenarios:
  • Text searches
  • Numeric searches
  • Date searches
  • Boolean searches
  • Tabular searches
  • Searching for the presence of any value
  • Combining search criteria

Text searches

In these examples, the criteria are that the attribute Base in the MaterialUniverse table:
  • Contains iron (contains=)
  • Does not contain iron (does_not_contain=)
  • Contains one of three specified metals (contains_any=)
  • Contains all three specified metals (contains_all=)
All materials that contain Iron:
Previous cell output:
Previous cell output:
All materials that do not contain Iron:
Previous cell output:
All materials that contain one of Iron, Aluminum or Titanium:
Previous cell output:
All materials that contain Iron, Aluminum and Titanium:
Previous cell output:

Numeric searches

In this example, the criteria are that the attribute Yield Strength, L in the Design Data table is either greater than or less than 145 ksi.
Materials with a Yield Strength less than 145 ksi:
Previous cell output:
Materials with a Yield Strength greater than 145 ksi:
Previous cell output:

Date searches

In this example, the search is for records in the Legislation and Lists table with an Effective Date between 1970 and 2000.
Previous cell output:

Boolean searches

Search for records with a certain Boolean value. In this example, the search is for all materials where RoHS compliant grades are available.
Previous cell output:

Combining criteria

The search_for_records_where method takes a list of criteria, allowing criteria to be combined as long as they relate to attributes in the same table.
Previous cell output:

Searching for the existence of data

We can also define criteria that search for records which have any value for the specified attribute, with no restriction on the data.
Previous cell output:

Searching for tabular data

Searching tabular data works in exactly the same way as searching attributes, except the criteria require an additional argument to specify the applicable column. This example finds all records in the MaterialUniverse table that contain at least one tabular row, and where both the following are true:
  • The ‘Substance name’ column contains the text value ‘Alkanes’
  • The ‘Amount’ column contains a value greater than 10.0 % (the criterion value is defined in the current unit system)
Previous cell output:
Print the results of the tabular search.
Previous cell output:

Searching with pseudo-attributes

Some pseudo-attributes (also known as record properties) can be used as search criteria, they behave as ordinary attributes and permit the same criteria to be used. This example searches for tensile test results for MTS samples (High Alloy Steels) that were created during September 2023.
Previous cell output:
Pseudo-attributes are not table specific and can be used in database criteria searches via Database.search_for_records_where(). In this case, search results can include records from multiple tables.