Open app

Tutorial 09 · Basic logic

Prefill and calculated answers

Fill a blank answer with a useful default, then maintain a separate calculated, read-only copy.

Step-by-step guideSetup · Flow · Test

1. Prepare the survey

Open a practice survey from Home and click Edit. Add these pages and questions in the order shown. Click a question type in the builder palette, then select the question to edit its label and choices. Use Add Page for later pages.

PageQuestionType and setup
DepartmentUse the standard department?Single choice · Optional initially · Choices: Yes, No
DepartmentDepartmentText box · Optional initially
DepartmentRead-only department copyText box · Optional initially

2. Configure the logic

  1. Add the default rule

    Choose Fill, clear or lock an answer. Set Use the standard department? to equals Yes. On the action step select Set answer, target Department, choose Use a fixed value, and enter Customer success. Leave Keep this answer calculated unchecked.

  2. Review and save the default

    Click Next, review the flow, name it Fill a blank department, and Save logic. The default fills blank answers; it does not replace a manually entered department.

  3. Create the calculated-copy rule

    Start the same logic option again with the same Yes condition. Select Set answer and target Read-only department copy. In Answer value choose Answer: Department. Check Keep this answer calculated (overwrite manual values).

  4. Lock the copy

    Click Add another action. Choose Read-only question and target Read-only department copy. Review the flow, name it Maintain a read-only copy, and Save logic.

  5. Check both saved rules

    There should now be two enabled rules. The first supplies a default; the second continually mirrors Department while Yes matches.

In the app. Configure the condition that triggers prefill and calculated answers.Click the screenshot to enlarge it. Press Escape to close.
In the app. Choose the action, its target and any Otherwise behaviour.Click the screenshot to enlarge it. Press Escape to close.
In the app. The second rule calculates the department copy and makes it read-only.Click the screenshot to enlarge it. Press Escape to close.

3. Review the logic flow

Read the final flow before saving. For conditional rules, YES means the condition matches and NO means it does not. An unanswered source can leave the rule waiting. Use Try answers when it is available, or Back to adjust the setup. View full survey flow provides the surrounding page order and saved rules.

In the app. The final flow review for prefill and calculated answers, before Save logic.Click the screenshot to enlarge it. Press Escape to close.

4. Save and publish

  1. Save the reviewed logic

    On the final wizard step, click Save logic. Your changes join the survey draft. If the tutorial creates more than one rule or setting, complete and save every part before publishing.

  2. Confirm the draft is saved

    Close Logic. Wait for the builder’s save/sync status to complete. You can reopen Logic to check the saved rule or setting. Save logic does not by itself update the public survey.

  3. Publish the survey

    Click Publish in the builder, then Publish Now in the confirmation. Use the public link to test the published survey. After later edits, publish again before checking the live result.

  4. Test in a fresh respondent tab

    Start with a fresh public survey tab. If you already had an older published version open, reload and start a new response. Use a practice survey for test submissions.

5. Test the respondent experience

Run both the matching and alternative cases. Change answers and revisit earlier pages where the test asks you to, rather than testing only one path.

Try thisExpected result
Choose Yes with blank fieldsDepartment receives Customer success and the copy shows the same value.
Edit Department to ResearchThe read-only copy updates to Research.
Choose NoThe rule no longer locks the copy or keeps it calculated. Previously entered values are not automatically restored.
In the app. Changing Department to Research updates the calculated, read-only copy.Click the screenshot to enlarge it. Press Escape to close.

Common mistakes and useful limits

  • Leave overwrite off for ordinary defaults; enable it only when the value should remain calculated.
  • Read-only controls editing. Use a value action if you also need the server to recompute a fixed or referenced value.

Current limits

  • Automatically restoring a previous manual value after an overwrite is not implemented.