Skip to main content
Create and edit smart and static links between records.

Create a new record

Connect to MI and get a database and table.
Create a new record in the subset Materials.
A smart link is configured in this database to link records with matching values for the attribute Base. Setting a value for Base on the new record will link it to all existing records with the same value for that attribute. Set the value of Base to Oxide, then write the changes to MI. At this point, the new record is created on the server.
View the smart links that have just been created to the new record.
Previous cell output:
A static link can be created between two existing records, including cross-database. Get a record from MaterialUniverse to link to your newly-created record.
Add the MaterialUniverse record to the link group on the new record.
Write your changes to MI (use update_links() for changes to links, not update()).
View your new link on the list of record links.
Previous cell output:

Associated Records

Associated Records are a way of traversing tabular links multiple steps at a time. This example finds all materials impacted by a certain legislation by building an associated record chain between three tables. First define the starting table and record. The association chain starts on the relevant record in the Legislations and Lists table.
Next, set the tabular attribute that forms the first step in the chain. In this case, it is the tabular attribute that links the Restricted Substances table to the Legislations and Lists table.
Then set the tabular attribute that forms the second step in the chain: Restricted substances associated with this material.
Finally, use the get_associated_records() method on the starting_record Record object to extract the records at the end of the association chain.
Previous cell output: