I can see two things that could be going wrong:
The first is that, depending on whether or not that's the exact code you're using, your second "@Text" call is written as "@text" and that will fail, since JavaScript is a case-sensitive language.
Additionally, I believe currentDocument won't be available in the queryNewDocument event (unless, I suppose, there was another document data source defined previously, in which case it might refer to THAT one instead). The "postNewDocument" event may be what you're looking for: that will run when you're creating a new document but AFTER the "currentDocument" variable is set to that doc.
"postOpenDocument", on the other hand, will likely only run if the action is specifically to open an existing document, not make a new one (it's not a direct analogue to PostOpen on a Form).