Creating a Query with Runtime Prompts


Concept


Steps:

  1. Begin by navigating to the Records page.

     

    Click the Reporting Tools link.

    Step 1
  2. Click the Query Manager link.

    Step 2
  3. Click the Create New Query link.

    Step 3
  4. Use the Records page to view existing records. Select an existing record to create a new query.

    Step 4
  5. The first step in creating a query is to find an existing record for the query. In this example, you will locate and use the Student Enrollment Table record.

     

    Enter the desired information into the begins with field. Enter

     a valid value
     e.g.
     "STDNT_ENRL_VW"
    .

    Step 5
  6. Click the Search button.

    Step 6
  7. Click an entry in the Add Record column.

    Step 7
  8. Use the Query page to select the fields you want to add to your query, or to deselect fields to remove form your query.

    Step 8
  9. For the purpose of this lesson, the fields have already been selected for you.

    Step 9
  10. Click the Fields tab.

    Step 10
  11. Use the Fields page to view how fields are selected for output, view the properties of each field, change headings, change column and sort orders, and apply aggregate values.

    Step 11
  12. In this example, want to sort the results by class number and display the translate value short description for the heading text for the enrollment status field.

     

    Click the Reorder / Sort button.

    Step 12
  13. Use the Edit Field Ordering page to modify the order of the columns.

    Step 13
  14. Click in the New Order By field.

    Step 14
  15. Enter the desired information into the New Order By field. Enter

     a valid value
     e.g.
     "1"
    .

    Step 15
  16. Click the OK button.

    Step 16
  17. Click the Edit button.

    Step 17
  18. Use the Edit Field Properties page to change the column heading and apply the aggregate function to this query.

    Step 18
  19. Click the Short option.

    Step 19
  20. Click the OK button.

    Step 20
  21. Next, define the prompt criteria for the query.

     

    Click the Criteria tab.

    Step 21
  22. Use the Criteria page to view any existing criteria for your query, and if necessary, add or modify selection criteria for the query.

    Step 22
  23. Click the Add Criteria button.

    Step 23
  24. Use the Edit Criteria Properties page and set up a row of criteria using the prompt.

    Step 24
  25. Click the Select Record and Field button.

    Step 25
  26. Click the A.STRM - Term link.

    Step 26
  27. Click the Prompt option.

    Step 27
  28. If you click New Prompt, you are taken to the Edit Prompt Properties page, where you can create the prompt.

     

    Click the New Prompt link.

    Step 28
  29. Use the Edit Prompt Properties page to verify or select the parameters for the Runtime prompt.

    Step 29
  30. You can click the magnifying glass to select a prompt field. When accessing this page from the Edit Criteria Properties page, the field is already populated based on the field selected on that page.

     

    After you select a field, it shows the name of the field. Query looks to the record definition for information about this field and fills out the rest of the dialog box based on its properties.

    Step 30
  31. You can modify the Heading Type if desired:

    Rft Long: The long field name from the record definition.

    Rft Short: The short field name from the record definition.

    Text: User defined.

    Step 31
  32. Use the Edit Type field to define the type of field edit for the specified field. PeopleSoft recommends that you use the same Edit Type that is used in the field’s record definition so that the edit type is consistent throughout PeopleTools.

     

    If the Edit Type is Prompt Table, the value in the list box specifies the prompt table to use. If the Edit Type is Translate Table, the value in the Field list box determines the values used. Query assumes that the specified field has Translate Table values associated with it, and that the field is identified as a Translate Table field in its record definition.

    Step 32
  33. In this example, you will use all the default values for this field.

     

    Click the OK button.

    Step 33
  34. The prompt is now represented on the Edit Criteria Properties page as a bind variable, :1

     

    Click the OK button.

    Step 34
  35. Add the prompt criteria for the ID field.

     

    Click the Add Criteria button.

    Step 35
  36. Click the Select Record and Field button.

    Step 36
  37. Click the A.EMPLID - EmplID link.

    Step 37
  38. Click the Prompt option.

    Step 38
  39. Click the New Prompt link.

    Step 39
  40. Click the OK button.

    Step 40
  41. The prompt is now represented on the Edit Criteria Properties page as a bind variable, :2

     

    Click the OK button.

    Step 41
  42. Click the Save As link.

    Step 42
  43. Use the Enter a name to save this query: page to name and describe your query.

    Step 43
  44. Enter the desired information into the Query field. Enter

     a valid value
     e.g.
     "STDNTGRADE"
    .

    Step 44
  45. Click in the Description field.

    Step 45
  46. Enter the desired information into the Description field. Enter

     a valid value
     e.g.
     "Student Grades"
    .

    Step 46
  47. The Query Type field enables you to choose from User Query Type, Process Query Type, or Role Query Type. Standard queries are defined as User types, and queries that use workflow are defined as Process or Role types.

    Step 47
  48. Use the Owner field to specify the access to this query. Private indicates that only the user ID that created the query can open, run, modify, or delete the query. Public indicates that any user with access to the records used by the query can run, modify, or delete the query. For this example, you want to make it a private query.

    Step 48
  49. Click the OK button.

    Step 49
  50. Finally, view the results of the query.

     

    Click the Run tab.

    Step 50
  51. Notice that you are prompted to enter values before the query is run.

     

    Run the query for term 0475 (Fall 2002) and ID SR13580.

     

    Enter the desired information into the Term field. Enter

     a valid value
     e.g.
     "0475"
    .

    Step 51
  52. Click in the ID field.

    Step 52
  53. Enter the desired information into the ID field. Enter

     a valid value
     e.g.
     "SR13580"
    .

    Step 53
  54. Click the OK button.

    Step 54
  55. Use the Run page to view the results of your query.

    Step 55
  56. The class grades for this term and student are displayed.

    Step 56
  57. From this page, you can rerun the query for a different term and student.

     

    Click the Rerun Query link.

    Step 57
  58. Enter the desired information into the Term field. Enter

     a valid value
     e.g.
     "0475"
    .

    Step 58
  59. Click in the ID field.

    Step 59
  60. Enter the desired information into the ID field. Enter

     a valid value
     e.g.
     "SR0466"
    .

    Step 60
  61. Click the OK button.

    Step 61
  62. If you ever need to modify the prompt criteria, you can use the Prompts page to do that.

     

    Click the Prompts tab.

    Step 62
  63. Use the Prompts page to add, edit, and delete prompt criteria.

    Step 63

You have successfully created a query with runtime prompts.

Table of Contents  Start Topic