This article provides instructions on adding a prompt function in PS Query.
Prompts allow you to enter a value for a specific field at the time the report is run. The report will use that value in selecting rows and only return those that match. Prompts are useful for selecting the same information from different careers, for terms, for specific programs and plans, and so on. Creating a prompt in the criteria section is rather easy:
There are a couple of ways to add a new prompt. If the field is used in the query, go to the “Fields” tab. If the field is NOT used in the query, go to step #5 below.
Click the radio button for “Prompt” under “Choose Expression2 Type” and click “New Prompt” in the “Expression2” box.
Change the name of the prompt using the “Heading Text” box.
If the prompt is not required, click the check box for “Optional”. When it is optional, the query returns all of the values (for instance, Business Units or Institutions).
If you want to set up a default value, enter it under “Default Value”. The default value only works when the Optional box is unchecked.
If you know the prompt table, pick the magnifying glass and pick the table. The list of prompt tables is here. Make sure “Prompt Table” is selected under “Edit Type.”
Click “OK” to close the “Edit Prompt Properties” window, and click “OK” again to close the “Edit Criteria Properties”. Go to the “Prompts” tab and make sure the prompt that has just been added is on the list.
If the field is NOT used in the query, find the field you want to use for the prompt under the “Query” tab. Click the small funnel icon next to the field you want to add. Then, go back to the steps #2-4 above.
When running a query, the system will prompt the user for criteria values. Below is an example of when prompts are created for FISCAL_YEAR, ACCOUNTING_PERIOD, DEPTID, ACCOUNT, FUND_CODE, and PROGRAM_CODE.
You must have PS Query Manager to edit queries. If you don't have PS Query Manager, please contact DARTS@maine.edu. The DARTS team will be able to edit the query for you.