How can I insert a variable into quicktext?

I would like to create a quick text with integrated variable.

For example, if I just copy {Surname} into the quicktext, it will not work. Unfortunately I cannot find an option how to insert the variable. Can anybody help us?