Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Adding a question to a question page

Updated on March 29, 2022

Prompt users for information in a format that you define by adding a question to a question page. At run time, users interact with questions that you provide and deliver data that your business processes require to reach resolution. By engaging multiple types of questions, you can collect the exact information that you need.

For example, you can create a text box question and ask users to provide their name.
Before you begin: Create a question page to store the questions. For more information, see Adding a question page to a questionnaire.
For improved management of data in your application, you associate the questions with fields from a data model. The fields store the answers to the questions that users provide at run time. To meet your precise business needs, you can mark questions as required to ensure that users enter these answers before submitting the questionnaire. You can also validate the answers to avoid issues and help users provide information in an expected format.
  1. Navigate to the questionnaire:
    ChoicesActions
    Open the questionnaire in App Studio
    1. In the navigation pane of App Studio, click Case types.
    2. In the list of case types, open a case type of the Questionnaire type that you want to edit.
    Open the questionnaire in Dev Studio
    1. In the header of Dev Studio, click ConfigureCase ManagementQuestionnaire.
    2. Click the questionnaire that you want to edit.
  2. On the Questionnaire tab, on the question page that you want to edit, add a question:
    ChoicesActions
    Create a new question
    1. Click Add questionNew.
    2. In the list of question types, select a type that you want to use, for example, select Text (paragraph).
    3. In the text editor, enter the text of the question.
      For example: Enter What would you change in our customer service?
    4. If a question type that you want to create requires additional formatting, provide relevant configurations.
      For more information about formatting questions, see:
      Note: Only standard Pega Platform applications support most questions that require formatting. Applications based on Cosmos React do not display formatted questions. A picklist is the only formatted question that you can use both in standard Pega Platform and Cosmos React applications. You can use currency and decimal questions only in Cosmos React applications.
    Reuse an existing question
    1. Click Add questionFrom library.
    2. In the Questionnaire library dialog box, select a question that you want to reuse, and then click Add next to the question.
    3. Close the dialog box by clicking Add.
  3. In the Map answer to field list, select a field in the data model that stores the answer:
    ChoicesActions
    Reuse an existing fieldIn the list, select the field from a data model.
    Create a new field
    1. In the list, click Create New.
    2. In the Add field dialog box, in the Field name field, enter the name, for example, enter SatisfactionLevel.
      The field type is the same as the question type.
    3. Optional: To provide additional configuration for the field, expand the Advanced section, and then provide a new field ID, a description, and the maximum number of characters of the value that the field stores.
    4. Click Submit.
  4. Optional: To ensure that users answer a question, mark the question as required.
  5. Optional: To ensure that users provide answers in an expected format, create a validation.
    For more information, see Validating answers in a questionnaire.
    Result: If the validation fails at run time, users receive an error message. Users need to correct the answers with failed validation before submitting the questionnaire.
  6. Optional: To display the question only in selected scenarios, configure visibility conditions.
    Result: At run time, the questionnaire displays the question only if the visibility conditions evaluate to true.
  7. Optional: To manage your questions efficiently, categorize the question:
    1. In the Question settings pane, in the Category section, click the Properties icon.
    2. In the Category field, enter the category, for example, CustomerService.
    3. Click OK.
  8. Optional: To add more questions to the question page, repeat steps 2 through 7.
  9. Click Save.
What to do next: Configure how your questionnaire displays at run time. For more information, see Creating views for case typesand Creating views in Cosmos React.
  • Formatting text boxes in a questionnaire

    Format multiple text boxes in a questionnaire to ask users to provide short text answers. For example, in a questionnaire for job candidates, you ask users to provide their university major, previous employer, and a name of their own business if they have one.

  • Formatting a picklist in a questionnaire

    Format a picklist in a questionnaire to define the choices that users can select to answer a question. With a picklist, users can select only one answer to a question. For example, you can ask users about their rating of customer service in your company, and then provide a choice of answers that range from excellent to poor.

  • Formatting a checklist in a questionnaire

    Format a checklist in a survey to define the choices that users can select to answer a question. With a checklist, users can select multiple answers to a question. For example, in a questionnaire for job applicants, you can ask users to select the languages that they speak.

  • Formatting a slider in a questionnaire

    Format a slider in a survey to control the range of values from which users select an answer. For example, you can ask how many days users work each week by formatting a slider with the values one through seven.

  • Formatting a radio button matrix in a questionnaire

    Format a radio button matrix in a survey to ask a series of related questions that users answer by selecting one option from a repeating group of radio buttons. In a radio button matrix, in each row, users can select an answer from only one column. For example, you can ask users to rate their pain threshold on a scale of one to five for different activities, such as swimming, running, or walking.

  • Formatting a currency question in a questionnaire

    Enable users of your application to provide answers that precisely fit their financial business scenarios by creating a question of a currency type. As a result, users can clearly link the number that they provide to the amount of money in a specified currency.

  • Formatting a decimal question in a questionnaire

    Help users of your applications provide detailed and accurate answers that require numbers by creating decimal questions. At run time, users can enter numbers that include decimals after a separator to provide very detailed information. As a result, your application can precisely meet even the most specific business requirements.

  • Scoring answers in a questionnaire

    Calculate a cumulative score based on your questionnaire results, to generate metrics and trends for a specific focus group. For example, in a questionnaire about satisfaction with customer service, you can assign high scores to better ratings and low scores to poorer ratings to quickly calculate the general satisfaction level of customers.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us