I don't know if i'm doing something wrong but if i put inside the "Read file" command an resource file path "lines from file" the function doesn't work
Doing so means that there is path to another file inside your original file.
Just use resource anywhere in your code.
Hope that really answered your problem. Can also use the "Select Records" command, change the Table to the second one and add any filters you need. This will return all records in a list and using the Foreach will get the job done.