Hands-On Exercise 2
The best way to understand what's happening with the globals ^PersonD (for data) and ^PersonI (for indices) is to try it yourself in your myBASdatent routine.
Add a line to the validPhone() function that checks to see if the phone number already exists in the phone index.
Copy the store subroutine (from the Step-by-Step Guide) into your routine.
Compile and run the routine, and store one person's data. Look at the globals with the Management Portal. Run it again, and store a few more people. Look at the globals again, especially ^PersonI.
For instructions, click below.