How calculations work
Calculations transform questionnaire answers into derived results. They belong to the questionnaire and use configurable pipelines of operators.
Requires: Write access to configure the questionnaire; access to relevant answers to inspect or test results.
Each named calculation is one pipeline. Its operators run in order. Each pipeline starts with the submission's question values; it can explicitly reference a result from an earlier pipeline.
Inputs and results
Numeric inputs use answer positions when those are present; otherwise Status reads numeric answer text. Nonnumeric text is not silently converted into a score. Text and answer-item references are also available for operators that accept them.
Most operators retain earlier values alongside their new result. Select inputs explicitly so a later total does not include both original answers and an earlier total.
Per item changes an operator's mode. For example, ADD normally totals selected values; with Per item it adds Value to each selected numeric value. Create unique key preserves an original input and adds a separate result.
The pipeline's last stored entry supplies its headline result. An in-place change does not move an earlier entry to the end. Finish a scoring pipeline with an explicit aggregation of the intended inputs.
Timing and composition
Calculations run during answer processing. Changing a questionnaire's calculation affects future processing; it does not automatically rewrite all historical results.
References to another questionnaire use the same person's latest complete answer. If that source answer is missing, the reference may provide no value. Such references are not a live dashboard join.
Keep pipeline names unique and stable. Put prerequisite pipelines before those that reference them.