In my form, i want to propose a list of target depth (users build a hole), and allow to specify the true achieved depth.
By default, I want to set the achieved depth with the value of selected target depth. With calculation column, it’s ok.
But :
If I select a target detph (i.e. 2 m)
My Achieved depth is set to ‘2’
I edit the achieved depth to ‘2.3’
I submit.
In data, the achieved depth is 2.3 ; OK
If I edit the submission, the achieved depth is ‘2’
There is a way for non change the achieved depth on edit mode (i.e. not use the calculation) ?
Hi @jdugh, sorry I deleted my previous incorrect response. If you move your dynamic value from the calculation column to the default column it should fix this
survey
type
name
label
default
select_one depth
TARGET_DEPTH_NUMBER_AVAILABLE
Select the target detph
decimal
TRUE_DEPTH_ACHIEVED
Set the achieved depth
${TARGET_DEPTH_NUMBER_AVAILABLE}
Since KoBo uses your latest deployed form for editing submissions in Enketo, this will also allow you to make changes to submissions before this amendment.
Hi @Josh , thank’s for your reponse.
Unfortunately, this solution does not seem to work.
If I move to default column, when I select a value from the list, my decimal field TRUE_DEPTH_ACHIEVED does not update.
My new test : select_calculate.xlsx (22.2 KB)
And link to the test on Kobo : Enketo Express for KoBo Toolbox
Hi @jdugh, sorry about that — I was testing the edit and forgot to ensure the form still operated correctly. Please try something like this using the trigger column. It seems to do the trick:
Yeah ! This is it !
The last trick who would be great : there is a way to keep the last ${updated_num} submit value ? Even if I change the ${num} value in edit mode ?
I try with adding a calculate question with the calculation : once(${updated_num}). Without success.
Thank you @Josh !