I would like to compare values across three records (Record A, Record B, and Record C)

Hello @Kal_Lam,
I have a question I would appreciate your prompt support with, as I am currently scripting a tool for immediate use.

I would like to compare values across three records (Record A, Record B, and Record C). Specifically, I want to check if the value entered in Record A matches the value in both Record B and Record C. If all three values match, the score should be 15; otherwise, the score should be 0.

Could you please guide me on how to implement this logic?
Thank you in advance for your support.

@bhabhadot, did you mean you wish to match the input made from the three questions (say Question A, Question B, and Question C)? If the value matches, then you would like to score it with 15 points, else 0. Could you also let me know what the three-question type would be? I would assume it would be an integer question type. But feel free to correct me if I understood you differently.

@Kal_Lam
You are absolutely right. Integers.

@bhabhadot, you should be able to do it as outlined in the image shared below:

In the survey tab of your XLSForm:

Data entry screen as seen in Enketo: when nothing is entered

Data entry screen as seen in Enketo: when the responses are different

Data entry screen as seen in Enketo: when the responses are same

Reference XLSForm:

Score Calculation.xlsx (10.0 KB)