This documentation supports the 25.3 version of BMC Helix Digital Workplace Basic and BMC Helix Digital Workplace Advanced. Icons distinguish capabilities available only for the Advanced and External license levels. For more information, see License types and features. To view an earlier version, select the version from the Product version menu.

 

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.
Scenario

Hanna is a BMC Helix Digital Workplace Catalog administrator who designs a questionnaire to help employees claim wellness reimbursements. She sets a monthly cap of ₹5,000 and uses built-in functions to automatically calculate and validate the total amount before the request is submitted. The questionnaire for the Wellness reimbursement service accepts multiple bill entries and uses functions to compute the total before submission.
Britney, a support team employee, logs in to the end-user console. She opens the Wellness reimbursement service and starts filling out the questionnaire. She enters the following bill amounts:

  • ₹2500 for a gym membership
  • ₹2000 for a weighing balance purchase
  • ₹1550 for a kneecap purchase

The system calculates a total of ₹6050. Because the calculated amount exceeds the monthly cap, the questionnaire prevents submission of the Wellness reimbursement request. Britney modifies the entries by removing the last one to ensure compliance with company budget limits and then submits the request.

Supported question types

The following list of questions is supported for defining functions that apply operations on the question responses:

Question typeOperations supportedResult of the operation
Text FieldAll string types, math,
Date
TEXT
Text AreaAll string types, math,
Date
TEXT
PasswordAll string types, math,
Date
TEXT
DateDateDATE
Date TimeDate and timeDATETIME
TimeTimeTIME
CounterAll string and mathINTEGER

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
Important
  • Empty texts and empty lists are considered equivalent to NO VALUE.
  • If you are trying to assign a text value to an integer, the text should contain integers. Otherwise, the conversion will not work, and it is considered empty text.
  • Applying operations to the repeatable set of questions is not supported.

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

  1. As a catalog administrator, log in to the Catalog console.
  2. Click the Services tab and then click Services.
  3. Double-click the service for which you want to update the questionnaire. 
  4. On the Service Options panel, click Edit next to Workflow
  5. On the Workflow & Questions panel, click Edit next to Questions.
    QR1
  6. 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.
  7. Select the appropriate Form Element Type from the list to which you want to add operations.
  8. To define functions, turn on the Operations toggle key.
    You can only see the functions supported for your selected question type.
  9. Click the operation you want to include in the argument.
    For example, you can select a mathematical operation for the sum of billing amounts.
    Math UI example
  10. Select the appropriate value in the Choose value fields depending on the required function.
    Supported options
  11. (Optional) To undo your action, click Undo. To redo, click Redo.
  12. 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:
    UI exp
  13. Complete the other required configurations and click Save.
Important

If the defined expression argument is invalid, the error message is displayed while saving the question.

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

FunctionDescriptionExampleNotes
LOWER(TEXT) =>TEXTConverts 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)=>TEXTConverts 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)=> TEXTReplaces 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, "-", "")
Result: 911234567890

CONCATENATE(TEXT, TEXT)=> TEXTJoins 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:
CONCATENATE(First Name, Last Name)
Result: ManyMann

Use $NEWLINE$ to insert a line break between strings. Example: CONCATENATE(question1, $NEWLINE$, question2, question3, question3) results in:
question1question2question3question3
SUBSTRING(source, start, end)=> TEXTExtracts 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) => INTEGERReturns 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) => TEXTReverses 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

FunctionDescriptionExampleNotes
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

FunctionDescriptionExampleNotes
DATE(DATETIME) => DATEExtracts 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 | DATETIMEAdds 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) => INTEGERReturns 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:

QDesigner

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:

req submission ui

Related topics

Exploring the Question Designer

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*