How do use a free text value as input for feedback

As another example, here’s another piece of code that appears to do the trick: Redo all incorrect trials

It uses images (whereas I have words) but I’m not sure how to integrate the (test iterations) counter into by program.