Copy page data value to use as document title

Hello,

I am trying to print a page as pdf and give it a certain name.

I have a name set in Page Data:
image

Now i want to print the page with that name:
image

What is the correct way to get the property copy of page data in var b ?

Never mind, managed to resolve it:

image