Skip to main content

Hands-On Exercise 7

generated description: handson.gif

Add editing capabilities to your lookup routine:

  • Add code to main to call a new procedure called edit once the user has made a choice from the list of matches.

  • The edit procedure should lock the record chosen for editing. Then it should call three new procedures: load, reprompt, and update. After the update, unlock the record.

  • The load procedure simply loads the person's data. Update the display procedure to call this new procedure. The reprompt procedure should mimic the prompts and use the “$$valid” functions from your data entry routine, but also display the current data.

  • If changes were made, the update procedure should start a transaction, and store the new data in ^PersonD. Next, it should update ^PersonI. Updating an index means using Kill on the old entry in the index and adding the new entry.

For instructions, click below.

generated description: stepbystep.gif

FeedbackOpens in a new tab