Enketo does not set irrelevant fields to "void"

Hi there!

When a field that was relevant according to a given condition, and thus displayed, becomes no more relevant because the condition changed, it is correctly hidden. But its value seems to not be set to ‘’ (two simple quotes, meaning void), as I would expect.

Therefore, if yet another field was conditioned to the value of that field, that other field would remain displayed whereas, functionally, it is not relevant any longer.

Plus: I have not tried it yet, but it makes me think that the data will then contain some value in an irrelevant field, which I would not expect.

Thanks for your attention.

Hi @freedim,

I checked your concern in both Enketo as well as the Collect app (KoBoCollect android app as well as the ODK Collect android app) and they both behaves in the same way. I did the following:

  1. Fill Q1 Do you love eating fruits? as Yes.
  2. Fill Q2 Number of fruits you consume in a single day: with 1 as its response.

  1. Go back to Q1 and change the response to No.

  1. Click back to Q1 and select Yes to see if the value you entered previously is still there in Q2. Please note: the value you entered as 1 is still there in Q2.

  1. Once again, go back to Q1 and change the response to No.

  1. Press Submit.
  2. Check the DATA>Reports. And you should see only No being submitted in the server.

I checked this out through Enketo, KoBoCollect android app and ODK Collect android app (and they all behave in the same way).

For reference please see the DATA>Reports which is as follows:

Reference xlsform:
Skip Value Test.xlsx (10.9 KB)

Summary to your query:
Despise the fact that if you skip Q2, the response once entered in Q2 stays there (even though you make changes in Q1 which should only hide Q2). These type of information like the one recorded in Q2 however, does not get recorded in the server.

Have a great day!

Hi @Kal_Lam

Thanks for your quick answer.

So you checked that the recorded data is fine and that the "Plus:… " paragraph of my issue is not a problem. However, the main concern of my raised issue remains valid, which you can check by adding the following CSV row to your survey sheet and test with exactly the same steps that you did:

text,Q3,“Please explain why you don’t eat fruits while you love it :”,1,${Q2}<1

(Sorry but new users are not allowed to upload files, so I could not upload the updated form myself.)


Hi @freedim,

You should now be able to upload a file. Would you mind sharing your xlsform so that we could have a look at our end.

Have a great day!

as @Kal_Lam explained this is the normal KoBo behaviour. As the 3rd variable Q3 is only dependent on variable Q2 (which doesn’t change, before save/validate, but is only hidden), it is not updated by changing variable Q1.
Everything is cleaned on save/validate. You can see this when you save and re-edit, or validate and go back.

Here an example and a solution for Enketo if needed. If cascading dependency you should reference all “parents” in Enketo.
SkipValueTest_02.xlsx (10.1 KB)

Concerning visibility, there is a difference between Enketo and KoBoCollect. After changing Q1 from Yes to No, Enketo will still show Q3. But KoBoCollect will NOT. For Q4 Enketo behaves the same as KoBoCollect.

This seems a general difference of dependency update mechanism between Enketo and KoBoCollect, Maybe @Kal_Lam can explain the general difference?

Side-note: There is no difference between page style:: single or multiple. I tested with OCHA server.

Best regards

1 Like

Thanks for both replies.
@wroos: good to know that at least KoBo Collect, which I have not tried with this issue, hides both Q2 and Q3 when Q1 is back to “No”. Hence my mentioning “Enketo” in the issue title. Is it actually the intended behaviour by Enketo developers?

I had figured out the workaround that you suggest in Q4, but in some very long and complex forms, I think going back the whole chain of conditionality with “and” can be tedious (and hellish to debug if bugged), especially if your “conditionality tree” is deep and with many different branches.