Skip to main content

Hands-On Exercise 4

generated description: handson.gif

Add editing capabilities to your myBASlookup routine:

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

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

  • The load subroutine simply loads the person's data. Update the display subroutine to call this new subroutine.

  • reprompt is a function. It should mimic the myBASdatent prompts and use its “valid” functions, but also display the current (old) data inside the prompts. It should return True if changes were made.

  • If changes were made, the update subroutine should start a transaction, and store the new data in ^PersonD. Next, it should update ^PersonI. Updating an index means: using Erase() 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