Replace PDF file name Function

I am getting a message that the variable is not defined though I think I defined it properly in the Run Function Code. I am attempting to replace the original PDF file name with the students name:


CleanShot 2025-05-02 at 16.53.07