From 21b20f342aeb0ce1d7d4172309909d219a7f4ea7 Mon Sep 17 00:00:00 2001 From: Fabio Ambauen Date: Fri, 6 Sep 2024 08:57:18 +0200 Subject: [PATCH] docs: calculated answers can depend on calculated answers See https://github.com/projectcaluma/caluma/pull/2250 --- forms/calculated-questions.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/forms/calculated-questions.md b/forms/calculated-questions.md index 2fc88b3..6a76bff 100644 --- a/forms/calculated-questions.md +++ b/forms/calculated-questions.md @@ -30,6 +30,4 @@ A couple of mutations act as entrypoints to evaluation of the export and lead to ### Limitations -Currently the calculated questions cannot reference other calculated questions. This is an intentional limitation to avoid implementation complexity (dependency calculation "propagation", circular dependency checks). - -Additionally only existing questions can be referenced at the time of saving. This is because of optimizations in the way caluma tracks references of calculated questions. Specifically, caluma writes the reverse-dependencies to the database at the moment a calculated question is saved. If a referenced question would be missing at this point, it couldn't memoise the calculated question and thus not update if an answer is created or updated. +Only existing questions can be referenced at the time of saving. This is because of optimizations in the way caluma tracks references of calculated questions. Specifically, caluma writes the reverse-dependencies to the database at the moment a calculated question is saved. If a referenced question would be missing at this point, it couldn't memoise the calculated question and thus not update if an answer is created or updated.