Now that we have created our Contact class, we can populate it with test data using the Caché auto-population tools. These are available to us because Contact extends %Populate.
Invoke the populate utility from the Caché Terminal. Here are the steps:
Launch Terminal. Do this by clicking the InterSystems Launcher (Caché cube , Ensemble icon , or HealthShare icon, depending on your system) in your system tray and then clicking Terminal on the launch menu.
If the terminal is not pointing at the USER namespace, use the ZN command to switch to USER.
Populate the namespace with ten Contact instances using the following command:
Here are the steps displayed in Terminal:
We can also launch an SQL shell from within terminal to view the newly created data. Here are the steps:
Execute the following command to launch the shell:
Next, enter an SQL query:
USER>>SELECT NAME FROM ContactDB.Contact WHERE Type='Personal'