Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Configuring Question Calculation Fields in a Form

This Feature lets you Calculate Questions and Responses in Forms

The steps provided in the article can only be performed by a CMO Application administrator as the settings are made within the Admin module. 

Begin by logging into the CMO Application and go to the Admin module.

clipboard_eeee353d91759e917e193ce7878f70c2c.png

Go to Forms.

clipboard_ed034cae8552524fc55fc862dd2798835.png

Go to the Draft version of the required Form.

clipboard_e0a86cc42e56b1b8f7ba77a022b451625.png

Go to the required Section.

clipboard_e3f88f9e8f88d89b635e8ef2f28093b7d.png

Select the Question for which the calculation field is required.

clipboard_ebc88af9945d429a1c8a31f0e6c400992.png

In the Response Text select the required text type.

clipboard_ef9f3247aab8fb6e2252bcafd9bf0baaa.png

In the 'Default tab' field select the required tab as Default. (In the below example, the Attachment tab is selected as default for the Question).

The Default tab shows what tab of the question will be opened by default in the perform window.

clipboard_e408a3655c49e095819964acc804db0a7.png

The Default tab displays what will be opened by default. In this instance “Question”.

In the Test calculation response, answer_1 does not contain a numeric value.

clipboard_eeba98da319586ce79a280829db281eaa.png

Click Save to save the changes.

How to Create the Answer (full configuration for calculation field response type)

To create the calculation response perform the following steps:

1.    In the Response tab click on the Add button
clipboard_eea88b894cc5aaed31c519f23f5b4c61b.png

2.    The Create Answer dialog opens.
clipboard_e18537424b1718f1b70413bfba3ca531c.png

3.    Select Calculated field from the drop down Response Type menu.
clipboard_e02a3035009079d11f170338b07f839ed.png

4.    Enter a Response Type description in the Response Text field
clipboard_e5271834127f7f3918891b50a0be34006.png

5.    In the Expression window enter the expression you want the perform event to calculate.
clipboard_ed16ba9fb05dfbd71ff13b1c22a3aaec0.png

6.    Select Validate to check the expression entered is correct.

7.    Click Save to keep the inputs and return to the Response tab.
clipboard_e94f7f44c636885951cc51c9c4ffd8499.png

The Response tab displays the answers used in the Expression field in the Calculation field response.

clipboard_e353b4217606f784561cbcde76ed37d90.png

Navigate back to the Form page (Click on Back to section and then Back to form button) and publish the template by clicking on the Publish form link. This is required to create the event in this form.

clipboard_e32696ce224d3f345d5a557ab0457d8f5.png

How the Answer is used

1.    Navigate to the Event List

2.    Click on the New button.
clipboard_ef5d6bbe311e4486983e5c0876aacce8c.png

3.    In the New dialog, enter the mandatory fields (Indicated with a * asterisk).

clipboard_eef23ce8c9ef4b96115871bfdd01a6d59.png

4.    In the Form select the template.

5.    Click Save and Perform at the bottom of the dialogue

In the “Calculation answer if logic tab” enter data to the answers which are used in the calculate response. The Calculation answer shows the calculated result. In this example the answer is OK.

clipboard_ef79bc55ea45bf5d172f8dd59afc655bd.png

In this example the Calculation answer is Fail.

clipboard_e77dc069a5b70b62cab62290666928104.png

About the Ternary Operator

The conditional operator, also known as the ternary conditional operator, evaluates a Boolean expression and returns the result of one of the two expressions, depending on whether the Boolean expression evaluates to true or false.

  • Was this article helpful?