Hi I have a question which I need to score wherein more than one response can be selected, and if more than 1 which is to be scored is selected it removes the value. Please show me how the more than 1 which is to be scored can be selected but only return a value of 1. see rows. 22-236 and rows 262 and 264 highlighted in yellow
Jan13.2021.xlsx (76.4 KB)
Welcome back to the community @scherrie! Would you mind providing a small condition as a backup with some dummy questions and response so that we could see if it’s possible through KoBoToolbox.
Not sure that I understand what you are asking. But here is a scenario.
(in order to be eligible applicant must score 2, ineligible <2
Eligibility criteria: Applicant must be age 17-65 (1 point)
Applicant must not have been a recipient of a covid-19 benefit programme
Questions:
-
What is your age?
-
Have you been a recipient of a covid-19 programme? (yes/no) If yes the following question will be the skip logic
-
Please select all which programmes you have received assistance from.
(a) covid-19 income support
(b) medical grant (c ) covid-19 small business (d) food pantry (e) day care assistance
Result (A) I would like 1 point to be scored if either b, d or e by itself, as well as any combination of those 3 are selected.
Eligible if Total score =2
Ineligible if Total score <2
Result (B) I would like no point to be scored if a or c are selected by itself or in combination with b, d, e., or a and b together.
Outcome:
Person would be eligible if age 17-65 and selected programme , b, d, e or any combination of b,d,e =2
Person would be ineligible if age is <17 or >65, or selected programme(s) included a response of a or c or any combination where either or both letters are included
Maybe you could do it as outlined in the image shared below:
In the survey tab of your xlsform:
In the choices tab of your xlsform:
Data entry screen as seen in Enketo: when a condition is not met
Data entry screen as seen in Enketo: when a condition is not met
Data entry screen as seen in Enketo: when a condition is met
Reference xlsform:
Eligibility Criteria.xlsx (13.5 KB)
Thanks for your reply. However, in your example when a condition is not met, the eligibility score should still remain 1 (as a result of age). There should be nothing scoree on the assistance question because income support and small business was selected which should result in zero eventhough day care was selected, which by itself would have scored 1… So the solution you presented does not capture what I stated in the example
OK, here is the revised one. This should work as you outline:
In the survey tab of your xlsform:
In the choices tab of your xlsform:
Data entry screen as seen in Enketo: when conditions are not met
Data entry screen as seen in Enketo: when conditions are not met
Data entry screen as seen in Enketo: when conditions are not met
Data entry screen as seen in Enketo: when conditions are met
Reference xlsform:
Eligibility Criteria.xlsx (13.6 KB)
So if there are 8 options of which 5 can result in eligibility, I would have to write all combinations for the 5?
I am not able to replicate the desired outcome. Please see attached
Testkobotypesofassistance.xlsx (9.3 KB)
Try giving a closer look at how it has been done. You should then be able to replicate the same in your context.
Hi @scherrie
Your problem lies here
if((${types_of_assistance}=‘2’ and ${types_of_assistance}=‘3’ and ${types_of_assistance}=‘5’ and ${types_of_assistance}=‘6’ and ${types_of_assistance}=‘7’ and ${types_of_assistance}=‘10’ and ${types_of_assistance}=‘11’) or (${types_of_assistance}=‘2’ or ${types_of_assistance}=‘3’ or ${types_of_assistance}=‘5’ or ${types_of_assistance}=‘6’ or ${types_of_assistance}=‘7’ or ${types_of_assistance}=‘10’ or ${types_of_assistance}=‘11’),‘1’,’’)
Could you look at the logic and simplify it. The logic looks a bit jumbled up.
Stephane
What I am trying to say is that a value of 1 should be returned if either of them is selected individually or in combination with those identified selections
But if the following 1, 3 , 8, or 9 is selected by itself, or in combination with each other , or in combination with the above mentioned a value of zero should be returned