Using writeToCSV with data from loadVars

Hello. Trying to see how to loop writeToCSV going down the rows. I have a CSV file loaded, using loadVars, that has account numbers. I need data from the page after it enters the account number to write into the CSV file. I can get it to do it on the first account number, but on the other account numbers, it will not write their corresponding data.

Example:
Case Name
3158167 Jane Doe
3156642
3037712
3071364
3163182
2953297
3164423
3074133

It does loop on the website to search the other account numbers, but doesn’t put in the name.

This is my test:

Hi there,

You could try to use appendToCSV command. Let me know if that works for you.