Skip to main content
All CollectionsHow to's
How to create a Numeric Expression

How to create a Numeric Expression

Updated this week

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:

  1. Navigate to the Design Screen of the survey.

  2. Go to Settings → Assignment & Formulas → Numeric Expressions.

  3. Click the Add Expression button.

  4. Enter an Expression Name.

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

  6. Once you have created the numeric expression, click Validate and Save.

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

Did this answer your question?