Displaying data as an external file

This question is in regards to this tutorial.

I need to create a employee directory for work. I saw this tutorial and thought it would be perfect. I took the code off the action layer and tried applying it to a button but it didn’t work and I got errors.

My idea would to have 1 frame and a button displaying each employee name. When you click “John Doe” it’ll display John Doe’s information (johndoe.txt) and would be different for each one.

Does anybody know how I could do this?