Supplement database variable with query variable

I am trying to realize a variable to be replaced.
In the modal it workt but does not directly on the page.
What am I doing wrong?

I am grateful for your help!

Community Page
Last updated: