Thanks for your help!Solved
Loop & Merge with Scoring (text box)
Hi All, I'm trying to create a task of counting objects in randomly presented images. There are 1000+ images in total within a loop & merge block, and respondents will work on the task for 10 minutes. They will automatically advance to the next regular block when time is up, regardless of how many tasks they have done. I enabled the timer feature with Javascript and it works fine. The tricky part comes in when I also want to evaluate whether respondents complete the tasks correctly. Images differ in terms of correct answer. I want to know that within the 10-minute, how many tasks in total a respondent manages to complete correctly. And then I want to provide this information back to the respondent at the end of the loop and merge block.
In the loop & merge block, I have a field with the image urls, and another field with the correct answer corresponding to the image. However, I couldn't figure out how to enable scoring with my question (and was told that this would be impossible when I contacted Qualtrics support). I wonder if there's anyway to code and achieve cumulative scoring with loop and merge block, especially as I don't have a simple multiple choice question.
Below is a snapshot of the task page:
!
Thanks for your help!
Thanks for your help!Best answer by TomG
The biggest issue is that you are doing an addOnload. That happens when the page loads, so the respondent hasn't done anything yet, and the input is blank. You should be using addOnPageSubmit. BTW, the class name for a text input is InputText.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

Then use the embedded data field "CorrectNum" in the block after the loop and merge block to show feedback to respondents.
I also tried to define correctNum globally in the Header and then increment the variable within the loop and merge block, which didn't work either. I suspect that variables need to be defined within the question page to be called.
Any clues? Thanks!