Creating questions with a table for response selection
As a catalog administrator or internal supplier, you can create questions with tables for a single or multiple responses selection, so that end users can answer a service question by selecting a row or rows in a table.
The response options table also provides end users with additional context and simplifies the process of selecting an answer to the question. By using questions with a table containing response options, you can easily simplify a complex questionnaire that includes a number of selection questions.
Scenario
Sarah is a people partner of a large department in her company, and she is responsible for ordering Christmas gifts for her department's employees with children.
As a people partner, Sarah needs to create service requests for these employees, and specify the type of gift. When people partners create such requests, the employees responsible for the company supply will know how many gifts of each type to order.
Emma is an internal supplier, and she is responsible for creating services for the HR department. To help Sarah with ordering the gifts, Emma creates a service that has questions with a table for response selection.
Since information about employees' children is not stored in the company database, Emma needs to create a questionnaire with questions that collect the following information:
- The employee name to whom the gift will be presented
- The type of gift to be presented
To collect information about the gift type, Emma creates a table for a single response selection, in which the values are static:
To collect information about employees for whom the service is requested, Emma creates a table with a multiple responses selection, in which the values are dynamically mapped to the CTM:People form:
When Sarah, as an end user, logs in to BMC Helix Digital Workplace, and requests a "Christmas present service," the questionnaire looks as follows:
Sarah needs to select the employees for whom she is requesting a particular gift type, and then select the gift type. To search for entries in the table with multiple responses selection, Sarah can use the Search field, which is displayed only if the number of entries available in the table is more than 10. Sarah can now request this service, and automatically order presents for employees with kids in her department. Depending on the type of gifts she needs, she needs to request this service multiple times.
Table types
You select a table type based on how many responses you expect an end user to be able to select when answering questions with a table of response selection:
- If you expect a single answer from end users, select the Table (single select) question form element.
- If you expect multiple answers from end users, select the Table (multi select) question form element. For a table with multiple responses selection, you can additionally configure the Selection limit - the maximum number of options that end users can select. By default, no limit is applied.
Static or dynamic values in the table
To create a table, you must add columns and rows. To populate your table with data, you must add static values or dynamically map values from an external form or a data set.
For a table with static values, you must configure Display value for each cell in the table. These values are displayed to end users.
For a table with dynamic values, you must map the question to a form, and then specify the columns which will be displayed to end users. Values in the table will be automatically mapped from the form that you selected.
Mapping table responses to variables in a subsequent workflow
You must define Stored value for a table of response selection. The stored value is passed as an input variable value to the subsequent workflow.
For a table with static responses selection, you need to define a stored value for each table row. For a table with dynamically mapped responses, you need to specify a field to provide the stored value for the whole question.
Important
The field you choose should provide a unique value across all records in the table. Otherwise the question might not provide a unique response.
You can map only the following workflow variable types to questions with a table of response selection:
Process variable type | Table (single select) question form | Table (multi-select) question form |
---|---|---|
Text | Supported | Supported |
Floating | Supported | Not supported |
Integer | Supported | Not supported |
Before you begin
Create one or more of the following items:
A service that will use the questionnaire, as described in Adding and updating services.
A workflow that will use the questionnaire, as described in Workflows for service fulfillment.
To create a question with static values in the response table
- Open a questionnaire in the Catalog console.
- Drag a process question onto the canvas.
- In the Question Designer panel, from the Form Element Type list, select a question type (single select or multi-select).
- (Table multi-select) For a multi-select table, select a value in the Selection Limit field.
- In the Label field, enter the text of the question prompt that you want to be displayed to the user.
- In the Question Values section, select Static, and then click Add Value.
The default table with three columns is displayed. - Perform one of the following steps to set the number of columns in your table:
- To add more columns to the table, click Add column.
- To remove columns from the table, move the mouse pointer to the column header, and then click X to remove the selected column.
- Specify the heading name for each column:
- Move the mouse pointer to the column header, and then click on the pencil icon,
- Enter a new name for the column header.
- To add a row to the table, click Add row. Add as many rows as you need.
- For each cell in the table, click in the cell, and specify the Display value field. This value is displayed to end users in the question with a table of response selection.
- For each row in the table, click in any cell, and specify the Stored value field. This value is stored internally, and is passed to a workflow as an input variable.
- Once you have completed configuring the table, you can perform one or more of the following tasks:
To enable a default selection row for the table, select a check box in the first column.
To change the order of the rows displayed in the table, select a row, and drag the row to a new place in the table.
- (Optional) Enable one or more of the other settings: Required, Read Only, Hidden, Internal Tags.
- Click Save to save the question.
The following figure shows an example of a question with a table of static responses selection:
To create a question with dynamic values in the response table
- Open a questionnaire in the Catalog console.
- Drag a process question onto the canvas.
- In the Question Designer panel, from the Form Element Type list, select a question with a table of response selection (single select or multi-select).
- (Table multi-select) For a multi-select table, select a value for the Selection Limit field.
- In the Label field, enter the text of the question prompt that you want to be displayed to the user.
- In the Question Values section, select Dynamic, and then click Map to Form.
- If the form that you select contains secure data that require administrator permissions to view them, select the Run as administrator check box.
- From the Map Data list, search for a form, and select it. The data in your question with a table of response selection will be queried from the form you select.
From the Stored Value list, select a field from which a value will be dynamically processed as an input variable in a workflow associated with the questionnaire.
Important
The field you choose should provide a unique value across all records in the table. Otherwise the question might not provide a unique response.
- (Optional) In the Query Filter field, add a query to filter the data. Only the data that matches your query will be displayed in your table.
- For each column in your table, specify the following details:
- In the Display Value list, select a field with values to be displayed to end users.
- In the column header, enter the column heading to be displayed to end users. If you do not enter the column header, the form field name will be displayed by default.
- To adjust the table appearance, perform one of the following steps:
- To add more columns to the table, click Add column.
- To remove a column, hover the mouse over the column header, and click X to delete it.
- (Optional) Enable one or more of the other settings: Required, Read Only, Hidden, Internal Tags.
- Click Save to save the question.
The following figure shows an example of a question with a table of response selection with dynamic values:
Important
If there are multiple rows with the same values, when the end user selects a row in a single-select table, all other rows with the same values are automatically selected.
Where to go from here
Complete other required tasks to complete your questionnaire as described in Designing a questionnaire.
Comments
Hello BMC,
Could be really useful to use the tables to add information captured in another question and the table start to grow accordingly to this info registered by the user , for example a Firewall request, usually a request specify source and destination, but if user want to specicify several sources and destination, right now they could rise several request tickets (not really useful for them) or add multiple questions to capture this; but this is not manageable if service definition needs to capture a lot of information.
Is there a way to use tables this way currently? Regards
Hello, Diego felipe Rodriguez gomez ,
Thank you for posting your suggestions. Please allow me a few days to confirm with my engineering team and get back to you.
Aaditi
Hello, Diego felipe Rodriguez gomez ,
We have this Community Idea https://community.bmc.com/s/idea/0873n000000Tfg8AAC/detail, which is similar to your requirement. BMC is working on this capability, which will be available soon.
Thanks,
Aaditi
Log in or register to comment.