Comparing DAT table cells

Is it possible to do the same things, but using only the name?
Example: I have a Data Tab file with questions and correct answers, and I want to compare the correct answer from one tab with the selected answer in the Select Tab. I have moved from DAT to CHOP, used the logic function, but I’m not sure how to proceed. Any advice?

Hi @dipaxrkh,

you can solve this with 2 Select DATs.
The first Select DAT will select the row with the current question - you can select here by number or value, appended to this is a second Select DAT which compares the given answer to the answer column:

The comparison of the question and answer is done via the “by Condition” value of the Select Rows parameter. In my case the condition would be

op('null_answer')[0,0].val == me.inputCell.val

In contrast to using the Row Select Value parameter here, I can make sure that the expected answer is equal to the given answer - otherwise with Row Select Value, a participant might sneakily hack the system by supplying wildcard answers like a* which would match any answer starting with the letter a.

Hope this helps
cheers
Markus

Hello @snaut and thank you for your reply.
Let me explain my specific situation, and perhaps the solution is the same.

At the moment, I have a CSV file with a row containing:

  • Question - Answer1 - Answer2 - Answer3 - Answer4 - Correct Answer

I’ve linked this to a Top Text file to display the questions to the user.
Using an Xbox controller, the user will need to select the correct answer.
If the answer is correct, they’ll be able to move on to the next question, and so on.

How should I format the CSV/Tab file in this case? I noticed that in the example you sent me there are q1, q2, q3, etc.

I hope I was clear—apologies if it was confusing!


Hi @dipaxrkh

I just had the multiple questions because I assumed that there would be multiple questions in the csv. Also not knowing of the multiple choice part. But in theory you can just do the same with your setup…
Now practically, I guess somebody is clicking on the right answer? So I would have a table with 5 columns:

question correct wrong1 wrong2 wrong3
first question some correct answer not right totally wrong just missed
second question another correct answer not right totally wrong just missed

Now I would have 4 buttons of which the first one would always have the correct answer. To make it a bit difficult for the player, you can randomize the position of the buttons essentially shuffling them while still keeping the correct answer on the same button for easy identification.

But I don’t know enough about your project - just a thought how I would approach this to not have to do much scripting.

cheers
Markus