Preselect checkbox based on previous response

@Grzesiek2010

1. What is the problem? Be very detailed.
i want to preselect checkbox base on previous single answer response
i.e.

Q1.Response are below (Single Answer)
A
B
C
D
E

Q2.Responses are same as above (Multiple Answer)
A
B
C
D
E

if user select "A" in Q1 then Q2 response "A" should be auto select, if i select "D" in Q1 then Q2 response "D" should be auto select, but user can also select other responses in Q2 along with response in Q1

2. What app or server are you using and on what device and operating system? Include version numbers.

ODK Aggregate, kobotoolbox

3. What you have you tried to fix the problem?

Add ${Q2} in calculation and trigger

4. What steps can we take to reproduce the problem?

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

Hi @noman.s2325
What you tried should work. I tried something like this:
calculateAnswer-export.xlsx (8.1 KB)

i have already tried this but you cannot select other responses in selectMulti... which are not selected in selectOne...

Yes you can I tested the form I attached... are you suing ODK Collect?

Yes i am using ODK collect but using kobo server for data collection.

calculateAnswer_-latest_version-labels-_2021-03-05-11-40-42.xlsx|attachment (5.0 KB)

example is attached for your reference, i select "a" in selectOne and "a,b,c" in select multiple but on data extraction i get only 1 response in selectMultiple exported file is attached...

i also have tried ODK aggregate, results are samecalculateAnswer_results.csv (200 Bytes)

So probably there is something wrong with Kobo because in ODK Collect I tested it and selected b in question 1 then I also selected c and after saving a form I checked the saved xml file (on my device) and the answers were correct. Could you do that the same? Or at least save a form and open it again to check if the answers are the same?

i have already checked this by uploading this form on ODK aggregate and results are same i have already attached the exported file and attaching again for your reference.

i think you should upload the data to the ODK aggregate after completing the interview, then check the results.calculateAnswer_results.csv (200 Bytes)

Please confirm that you are using exactly @Grzesiek2010's form and ODK Collect v1.30.1. I've confirmed that when I "View Sent Form", I see any selections I made and that the answers are as expected in Central.

Yes @LN I am using @Grzesiek2010 form without any change and ODK collect v1.30.1.
new results are uploaded : calculateAnswer_results.csv (148 Bytes)

in addition i am also adding link for a screen recording video for your reference if it can help you to find problem.

How are you converting the form? The minimum required form converter versions are documented at https://docs.getodk.org/form-logic/#triggering-calculations-on-value-change. The behavior you are showing would be consistent with using an older form converter.

@LN I am using "ODK XLSForm Offline V2.0.0".. for ODK aggregate.

@LN i am hosting my project on Kobotoolbox server, i am sure they are using updating version :slight_smile:

need a quick solution for this issue or some other solutions.

Great, that explains the issue -- XLSForm Offline has not been updated recently and we don't have a timeline for next updating it. For now you will need to use https://getodk.org/xlsform/, Central, or some other system that uses pyxform 1.2+.

@LN

but i am hosting my project on kobotoolbox not on aggregate and there is no need to convert xlsform in kobotoolbox just upload your excel sheet and deploy your project on kobotoolbox

It works using the online form converter so that is the recommendation.

Kobo is a separate project and we have no idea what form converter version they are on. For Kobo questions, please ask at https://community.kobotoolbox.org.