Defining dynamic query menus
If you are creating a query menu while creating a service request definition (SRD), you can create a dynamic query menu, which is an extension of a query menu. You can create a question that depends on the answer to a previous question. For example, after you select a restaurant, you select the cost of that restaurant.
To avoid circular results, do not create a dynamic query menu that depends on the answer of another question, which similarly requires an answer from the original question. For example, Question 1 should not depend on the answer to Question 2 if Question 2 requires an answer from Question 1.
To define dynamic query menus
- Search for the SRD, select it, and click View.
- After you enter a PDT in the Process Template field, click Questions & Mappings located under the Process Template field.
See Adding a PDT to an SRD.
- Click Add Question.
- In the Question Text field, enter a question for users.
If you want to enter the greater than (>) or less than (<) sign in the Question Text field, use encoded text (> for >, and < for <); otherwise, browsers will interpret the greater than and less than signs as HTML markup, which is not supported. For more information, see Restrictions in creating questions.
- (Optional) In the Instructions field, enter instructions on responding to the question.
- In the Question Format field, select Menu.
- From the Menu Type list, select Query.
- From the Form Name field, select the form from which to show the answers (for example, AP-Sample:Restaurant).
- From the Display Label field, select the field associated with the form.
- Leave the default value entered in the Actual Value field.
- (Optional) Edit the Actual Value field.
- To construct a qualification:
- Click Query Builder.
- Using the fields and buttons in the dialog box, enter a qualification in the Qualification field.
From the Question drop-down list, you can select a question that is already defined in the SRD. The data you retrieve depends on the response to the question you select in the Question field.
For example, you might define a question (Restaurant Location) that uses a dynamic query menu. The menu queries the Restaurant Locations form with this qualification:
'Restaurant' = <Restaurant Example>
The menu for the Restaurant Location question will list all locations for the restaurant specified in the preceding Restaurant Example question. Without a qualification, all locations are listed, regardless of the restaurant selected.