Applying operations to question responses
As a catalog administrator, apply operations on the question responses and design a responsive questionnaire that adapts in real-time to user input. The operations can compute derived values, enforce business logic, and automatically populate dependent fields before request submission. These configurations are carried out in the Question Designer within the catalog console. End experience the capability while interacting with the questionnaire during request submission. This capability helps prevent non-compliant entries, minimizes errors, and accelerates processing the service requests. It also reduces manual input and cognitive load, enhancing the overall user experience.
How applying operations to question responses works
Catalog administrators can define functions that automatically derive values based on user responses while the questionnaire is being filled out. These functions can combine answers from multiple questions by using supported operations such as string, concatenation, or basic math. The result is then assigned to another question in the questionnaire. You can also define nested expressions for complex scenarios. The computed result can be utilized in various ways, such as to control what users see next, filter lookup data, or pass values into the process. Here are some common examples:
- Auto-calculating totals for expense forms.
- Validating eligibility for refund limits.
- Populating dependent fields like the full name from the first and last names.
Supported question types
The following list of questions is supported for defining functions that apply operations on the question responses:
Question type | Operations supported | Result of the operation |
Text Field | All string types, math, Date | TEXT |
Text Area | All string types, math, Date | TEXT |
Password | All string types, math, Date | TEXT |
Date | Date | DATE |
Date Time | Date and time | DATETIME |
Time | Time | TIME |
Counter | All string and math | INTEGER |
Limitations
The following question types are not supported for applying operations:
- Dropdown (Single)
- Dropdown (Multi)
- Lookup
- Radio Buttons
- Checkboxes
- Table (Single)
- Table (Multi)
- Toggle (Yes/No)
- File Attachment
- Documents
Before you begin
- To learn about defining functions and applying operations on the question responses, see the List of operations table following the procedure.
- To understand more about adding questions to the questionnaire, see Adding questions to a questionnaire.
To add operations while adding a question in the questionnaire
- As a catalog administrator, log in to the Catalog console.
- Click the Services tab and then click Services.
- Double-click the service for which you want to update the questionnaire.
- On the Service Options panel, click Edit next to Workflow.
- On the Workflow & Questions panel, click Edit next to Questions.
- In Questions Designer, perform either of the following steps:
- To add a process question, select a question from the Process Questions list, and click on the + button to add this question to the canvas.
- To add a user-generated question, click Add> Question next to the User Generated Questions.
- Select the appropriate Form Element Type from the list to which you want to add operations.
- To define functions, turn on the Operations toggle key.
You can only see the functions supported for your selected question type. - Click the operation you want to include in the argument.
For example, you can select a mathematical operation for the sum of billing amounts. - Select the appropriate value in the Choose value fields depending on the required function.
- (Optional) To undo your action, click
. To redo, click
.
- Insert the required fields and define the function by using appropriate operators.
For example, to define a function for the total bill amount, select questions for the bill amounts entered from the list, and select the addition operation.
The following image shows the UI for this example: - Complete the other required configurations and click Save.
List of operations
You can define the functions by applying operations to the question responses. The following operations are available in the Question Designer:
Math functions
- Addition
- Substraction
- Multiplication
- Division
- Pecentage
String functions
Function | Description | Example | Notes |
LOWER(TEXT) =>TEXT | Converts all characters in the input string to lowercase. | Question type: TextField Question label: Full Name User input: Mary Mann ExpressionLOWER(Full Name) Result: mary mann | — |
UPPER(TEXT)=>TEXT | Converts all characters in the input string to uppercase. | Question type: TextField Question label: Full Name User input: Mary Mann Expression: Upper(Full Name) Result: MARY MANN | — |
REPLACE(TEXT source, TEXT replaced, TEXT by)=> TEXT | Replaces all occurrences of the specified text in the source string by another text. | Question type: Text Field Question label: Phone number User input: 91-123-456-7890 Expression: REPLACE(Phone number, "-", "") | — |
CONCATENATE(TEXT, TEXT)=> TEXT | Joins two or more strings into one. | Question type: Text Field Question labels: First Name, Last Name User input: First Name = Mary, Last Name = Mann Expression: | Use $NEWLINE$ to insert a line break between strings. Example: CONCATENATE(question1, $NEWLINE$, question2, question3, question3) results in: question1question2question3question3 |
SUBSTRING(source, start, end)=> TEXT | Extracts a substring from source, starting at index start and ending before index end. | Question type: Text Field Question label: Employee ID User input: EMP12345 Expression: SUBSTRING(Employee ID, 3, 8) Result: 12345 | The end index is excluded from the result. |
LENGTH(TEXT) => INTEGER | Returns the number of characters in the input string. | Question type: Text Field Question label: Comments User input: Please arrange a service call Expression: LENGTH(Comments) Result: 25 | Includes spaces and special characters. |
REVERSAL(TEXT) => TEXT | Reverses the characters in the input string. | Question type: Text Field Question label: Device Serial Number User input: SN-987654 Expression: REVERSAL(DeviceSerial Number) Result: 456789-NS | Useful for formatting or encoding. This function can be used to generate a temporary tracking ID or to validate that the serial number format is being processed correctly by reversing it for internal logging or testing purposes. |
Date functions
Function | Description | Example | Notes |
YEAR(datetime DATE | DATETIME) | Returns the year component of the input. | Input: 2025-06-13 14:30:00 Expression: YEAR(SubmissionDate) Result: 2025 | — |
MONTH(date) | Returns the month of the year (1 = January). | Input: 2025-06-13 Expression: MONTH(SubmissionDate) Result: 6 | — |
WEEK(date) | Returns the ISO 8601 week number of the year. | Input: 2025-01-01 Expression: WEEK(SubmissionDate) Result: 1 | Week 01 is the week with the first Thursday of the year. |
DAY(date) | Returns the day of the month. | Input: 2025-06-13 Expression: DAY(SubmissionDate) Result: 13 | — |
WEEKDAY(date) | Returns the ISO weekday number (1 = Monday, 7 = Sunday). | Input: 2025-06-13 (Friday) Expression: WEEKDAY(SubmissionDate) Result: 5 | — |
HOUR(datetime) | Returns the hour of the day (0–23). | Input: 2025-06-13 14:30:00 Expression: HOUR(SubmissionTime) Result: 14 | If a DATE is passed, returns 0. |
MINUTE(datetime) | Returns the minute component (0–59). | Input: 2025-06-13 14:30:00 Expression: MINUTE(SubmissionTime) Result: 30 | If a DATE is passed, returns 0. |
SECOND(datetime) | Returns the second component (0–59). | Input: 2025-06-13 14:30:45 Expression: SECOND(SubmissionTime) Result: 45 | If a DATE is passed, returns 0. |
TIME(datetime) | Extracts the time portion from a DATETIME value. | Input: 2025-06-13 14:30:00 Expression: TIME(SubmissionTime) Result: 14:30:00 | Returns the time in the datetime’s timezone. For epoch-based values, returns UTC time. |
Date and Time functions
Function | Description | Example | Notes |
DATE(DATETIME) => DATE | Extracts the date portion from a date-time value. | User input: 2025-06-13 14:30:00 Expression: DATE(SubmissionTime) Result: 2025-06-13 | |
DATEADD(datepart TEXT, number INTEGER, date DATE | DATETIME) => DATE | DATETIME | Adds a specified number of units to a date or a datetime. | User input: 2025-06-13 Expression: DATEADD("day", 7, StartDate) Result: 2025-06-20 | |
DATEDIFF(datepart TEXT, startdate DATE | DATETIME, enddate DATE | DATETIME) => INTEGER | Returns the difference between two dates or date times in the specified unit. | Input: StartDate = 2025-06-01, EndDate = 2025-06-13 Expression: DATEDIFF("day", StartDate, EndDate) Result: 12 | Returns an integer. Negative if EndDate is before StartDate. Mixed types (DATE + DATETIME) are normalized. |
Result
Catalog console
The following image displays an example of a function defined by using a math operation:
End-user console
The following image shows the corresponding user interface of the end-user console questionnaire for the same service request as an example:
Related topics