Dispatch for set card variables

I'm working on a dispatch to set part numbers on the part-card, using the filename without the extension. But I'm not able to create string for my variable, it's someone that can help me solve the problem.

SolidworksSolidworks Pdm enterprise Pdm