- Simple text search
- Record name search
- Criteria search
Connect to MI
Simple text search
Search for records which contain the string anywhere in the record.Record name search
Search for records by name. Only exact matches to the long or short name of a record are returned.Criteria searches
Search criteria are constructed from AttributeDefinition objects using thesearch_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=)
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.Date searches
In this example, the search is for records in the Legislation and Lists table with an Effective Date between 1970 and 2000.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.Combining criteria
Thesearch_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.
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.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)
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.Database.search_for_records_where(). In this case, search results can include records from multiple tables.