From f485f9f20c683b57f13c1d2a824b71da452e63c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Martin?= Date: Mon, 22 Nov 2021 11:07:06 -0800 Subject: [PATCH] Recommend against last-saved in contexts other than defaults --- src/form-logic.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/form-logic.rst b/src/form-logic.rst index 96453bca2..6e7fe1a30 100644 --- a/src/form-logic.rst +++ b/src/form-logic.rst @@ -222,10 +222,12 @@ Values from the last saved record .. warning:: - Support for last-saved was added in Collect v1.21.0 and Central v1.3.0. Using older versions or encrypted forms will have unpredictable results. + We only recommend using last saved values as defaults. References to the last saved record could be used as part of any expression wherever expressions are allowed but this may lead to unexpected results on submission edit when the last saved record is likely to have changed. The last-saved feature does not work with encrypted forms. + Support for last-saved was added in Collect v1.21.0 and Central v1.3.0. Using older versions or encrypted forms will have unpredictable results. + You can refer to values from the last saved record of this form definition: :tc:`${last-saved#question-name}` @@ -241,7 +243,7 @@ This can be very useful when an enumerator has to enter the same value for multi The value is pulled from the last saved record. This is often the most recently created record but it could also be a previously-existing record that was edited and saved. For the first record ever saved for a form definition, the last saved value for any field will be blank. -Questions of any type can have their defaults set based on the last saved record. References to the last saved record can be used as part of any expression wherever expressions are allowed. +Questions of any type can have their defaults set based on the last saved record. .. _form-logic-gotchas: