Adding questions to an SRD
Learn how to add questions to a service request definition (SRD). You can map the questions to variables or SR fields. If you are localizing SRDs, you must add, sort, and map questions only in the default locale for the SRD. For more information, see Localizing SRDs.
To add questions to an SRD
Search for the SRD, select it, and click View.
- After you enter a PDT in the Process Template field, click Questions & Mappings under the Process Template field.
- On the Questions tab, create questions to ask your users.
- Select New Question.
- In the Question Text field, enter the question you want to add. You can also add any value that a browser can read, such as hyperlinks. See Adding hyperlinks in an SRD.
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.
- Select a question format (for example, Text or Menu).
In the Instructions field, enter instructions on responding to the question.
- Specify whether the question is Required, Hidden, or Read Only.
Text, Date, Time, and Date/Time questions can be made read-only. Hidden questions are for internal data processing and are not visible to users or administrators. You cannot hide Date, Time, and Date/Time questions. For more information, see Restrictions in creating questions.
Based on the question format, specify the question details.
For example, a text question requires that you define the default response, the number of text rows, and the limit input length.
You can also specify a regular expression to validate user response. If a user enters a response that does not match the the pattern specified by the regular expression, the system displays a general error message. See Examples of regular expressions.
You must add a forward slash (/) at the beginning and at the end of regular expression strings.
Use the Instructions field to show an example, such as
1-800-555-1212, to show the user how to match the pattern required by the regular expression. The system does not provide any prompts to help the user correct errors.
- To create your question, click Apply.
(Optional) Click Add Condition to dynamically define additional questions that appear in the context of the answer. See Adding branch conditions to questions.
- To specify the order in which the questions will appear in the SRD (when it appears in the Request Entry console), select the question and click the Up button to move it up or click the Down button to move it down.
- To remove a question from the list of available questions, select it from the navigation tree and click Delete.
- To map variables to questions, click the Variable Mapping tab.
See Mapping variables to questions.
- To map questions to fields on the Service Request form, click the SR Field Mapping tab.
See Mapping service request fields.
Examples of regular expressions
The following regular expression specifies a pattern for the phone number: (555) 555-1212:
The following regular expression specifies the pattern for email addresses in the format <name>@example.com
The following regular expression specifies the pattern for numeric input from 1 to 365, for the days of the year: