Progress
Results Administration
and Development Guide


Ask at Run Time Values

You can prompt users for input in generated code with the Ask At Run Time feature. There are two parts to the process. First, you specify that you want Results to accept input at run time. Then, when you generate the code, you can either specify the input values yourself or you can have Results prompt users for the values when they run the application containing the code.

If you choose to prompt users for the value when the code is run, the generated code includes an UPDATE statement for the Ask At Run Time phrase.

Specifying the User Prompt

You specify the user prompt when you are creating the query. Follow these steps to specify the user prompt:

  1. Choose Data Selection. If the query includes multiple tables, the Available Tables dialog box appears. Select the desired table, then choose OK. The Data Selection dialog box appears. If the query contains a single table, the Data Selection dialog box appears immediately:
  2. Activate the Ask At Run Time toggle box.
  3. Specify the selection criteria. The Ask At Run Time Prompt dialog box appears after you select an operator:
  4. Enter the string you want Results to use when it prompts the user for input, then choose OK. The Data Selection dialog box reappears. Notice that the selection criteria now contains the run-time expression, including the string you just entered.
  5. Choose OK to save the specified criteria and return to the main window.

Now, when you run the query, Results prompts the user for the selection criteria.

Generating the Query

Follow these steps to generate the query:

  1. Choose Query Generate. The Generate 4GL dialog box appears:
  2. Specify the name of the file, then save the file. If the file already exists, Results prompts you to replace the file.
  3. After you specify the file name, Results generates the code. Because you created a prompt phrase, the following dialog box appears:

  4. Choose Yes if you want to prompt the user for the input values or No if you want to specify the input values now. If you choose Yes, Results prompts the user for input when the code is run.
  5. For example, if you specify to ask the user “What is the customer’s number?”, the following dialog box appears when the code is run:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095