7.4 Prompt Key Processing Programs
Before attempting to enable and use the PROMPT key on any DISPLAY, REQUEST or POP_UP command you must understand what a prompt key processing program is and how it is used.
The following points elaborate on some of the most important points about prompt key processing programs:
- Prompt key processing programs are just normal RDML functions that have been coded especially to handle prompt key requests.
- Prompt key processing programs normally display a list of allowable values and allow the user to select the one they wish to use. Typically the list is of "codes" such as company numbers, product numbers, customer numbers, department numbers, etc.
Usually additional information is displayed in the list to allow the user to decide which code they wish to use (e.g.: company name, product description, customer name & address, etc).
- Prompt key programs are easily thought of as "black boxes". For instance a prompt key processing program that handles company numbers can be thought of as a "black box". You invoke it, and when it completes execution it gives back a company number (via the exchange list). How it decided upon (ie: "prompted") the company number is immaterial, what is important is that it returns a company number.
- The handling of the prompt key is performed automatically by LANSA in most situations. In our previous example about company numbers, the link between the field "company number" and its associated "prompt key processing program" is defined in the data dictionary. Once this link is defined, LANSA can handle the prompting of field "company number" automatically from any number of different screen panels.