Calculated field appears in form but not in data

Hi all,

In a repeat group listing household members we ask in select_one questions about their relation to the household "owner". The select question is different depending the age and the gender of the household member.

This means, that the information also appears in different columns in the downloaded data.

To have all answers regrouped in one column I introduced a calculation field (see file attached).

The form works fine and the data is displayed in the form while using it. However, when downloading the data the column is empty.

My guess is, that this is related to the "trigger" function. But whatever reference I add as trigger, no data is shown neither in form nor in the downloaded data.

Any ideas on how to resolve this?

Thanks in advance

calculation.xlsx (18.0 KB)

I think you can solve your issue more simply by using a choice_filter on the answer options and then keeping the relation in one question. Will this work?
calculation_dj edits.xlsx (14.8 KB)

Note that I also added a settings tab with allow_choice_duplicates set to yes because Autre/other is a choice that is in the list twice because it appears both times.

1 Like

Hi everyone,

I just saw a very elegant way to concatenate data from multiple columns in this example from ODK Entities documentation: https://docs.google.com/spreadsheets/d/1tfrpIrixbOHdAb_aLejWq7HTeJaSjZVqcQLdAP86WA0/edit#gid=0

It's done by using the coalesce() function. Maybe it can inspire you @dast

1 Like

Thank you both for this! Much simpler indeed! :upside_down_face:

I would also recommend to test the export (and if used reporting), please. The duplicates option might create problems for label export (and SPSS labels import). Also for Power BI or API links and in table view.

We preferred using "Epouse/ Epoux", etc. (This would even cover multiple sex cases). In personal interviews, normally the answer is given orally from the interviewee and only coded by the enumerator into the select list.

If you add further consistency checks, for example choice filter based on age (age difference, or only one partner and one parent) the duplicates option might become more complex as you always have to filter for both duplicates.,

1 Like

After several trials with different formulas including the once proposed above, I finally figured out that the problem with the data being displayed while filling out but not saved when submitting it depends on the browser used or the browser settings.

The same form saves data without issue when submitted with Enekto on Chrome, but not on Firefox. The same form submitted with Firefox but on another computer saves the data.

Is this a known issue?

So, it seems a local, browser related problem. Can you check that

  • the current Firefox release is installed and
  • no automatic cleaning of browser cache (and Kobo cookies) is configured.

You may also check for other configuration and usage differences between the critical browser/device and the working one (both with Firefox).

Hint: If possible, try to use exactly the same browser, version and settings for all survey devices. And try to pretest all accepted environments before data collection.