Strange Enketo Error ( Form Logic error )

1. What is the problem? Be very detailed.

Hi everyone,
We have a form that use pulldata function for 3 fields from a csv file inside a repeat, with Collect it's working very good but when i try to open the submission to view in ODK central it's enketo that give a strange error see picture of the error.

could someone had this kind of message and maybe found a workarround?

Thanks for the reply

2. What app or server are you using and on what device and operating system? Include version numbers.
versions:
ODK Central setup
24ee74e5f974a518aa1cc8b06e7addb3be6b4690 (v1.3.3-2-g24ee74e)
5cc6fd79d112ce36d6298c61bb8817689c4c323b client (v1.3.2)
1d1a3a59969e61383da74119e405e67778b7a170 server (v1.3.3)
on chrome Version 95.0.4638.69

ODK Collect v2021.3.1

3. What you have you tried to fix the problem?
not much as i didn't understood the meaning of the error.

4. What steps can we take to reproduce the problem?
with ODK Collect v2021.3.1 fill a submission and then try to view the submission with enketo on central.
at the opening it will give the same error.

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
lok_prod.csv (590 Bytes)
test.xls (33 KB)

Found it, it's looks like Enketo doesn't like 'concat' function in pulldata function but Collect don't complain :smiley:

pulldata('lok_prod',concat( 'ing_n_', ${position_ingredients}),'var_name', ${select_var_prod})

So found the workaround to my issue, i did an huge if statement for all all my possibilities :wink:

if( ${position_ingredients} = 1, pulldata('lok_prod','ing_n_1', 'var_name', ${select_var_prod}), if( ${position_ingredients} = 2, pulldata('lok_prod','ing_n_2', 'var_name', ${select_var_prod}), if( ${position_ingredients} = 3, pulldata('lok_prod','ing_n_3', 'var_name', ${select_var_prod}), if( ${position_ingredients} = 4, pulldata('lok_prod','ing_n_4', 'var_name', ${select_var_prod}), if( ${position_ingredients} = 5, pulldata('lok_prod','ing_n_5', 'var_name', ${select_var_prod}), if( ${position_ingredients} = 6, pulldata('lok_prod','ing_n_6', 'var_name', ${select_var_prod}), if( ${position_ingredients} = 7, pulldata('lok_prod','ing_n_7', 'var_name', ${select_var_prod}), if( ${position_ingredients} = 8, pulldata('lok_prod','ing_n_8', 'var_name', ${select_var_prod}),
if( ${position_ingredients} = 9, pulldata('lok_prod','ing_n_9', 'var_name', ${select_var_prod}), ' please add more if' )))))))))

so now i can use it in collect and see my submission in enketo on central :slight_smile:

1 Like