In BlockSurvey, you can create numeric expressions to perform calculations using the scores assigned to a question, answer options, values from other expressions, or assignments. Here’s how to set it up:
Navigate to the Design Screen of the survey.
Go to Settings → Assignment & Formulas → Numeric Expressions.
Click the Add Expression button.
Enter an Expression Name.
Write your expression using numeric operators and references. To recall answers, expressions, or assignments, type @ or click the Recall button and choose from the dropdown.
Once you have created the numeric expression, click Validate and Save.
Publish and test the survey.
Note:
While creating your numeric expression, you’ll find two optional checkboxes:
Recalculate expression on the results screen
Enable this if the expression needs to update dynamically on the results screen. Useful when answers or logic might change after submission.
Evaluate once and fix result
Enable this if you want the expression to run only once per response and fix the result. Ideal for use cases like generating a random number or a unique identifier.
Troubleshooting Tips
Expression Order Matters:
When referencing another expression, it must be listed above the current one. Expressions below are not yet defined and can’t be used.
Reorder Expressions:
Use drag-and-drop to rearrange the list of expressions. Always ensure dependencies are placed earlier to avoid evaluation errors.
Give it a try! Whether you’re calculating scores, building formulas, or assigning unique values, numeric expressions help you customize your surveys with precision and ease.