I have a WebQueryOpen agent setup and I want it to capture custom URL parameters. Something like:http://Host/Database/0/DocUNID?OpenDocument&Token=123
But the WebQueryOpen agent only seems to pick up the “OpenDocument” parameter
If instead I go (just for testing):
http://Host/Database/AgentName?OpenAgent&Token=123
This sees the custom parameter
Is this a limitation with WebQueryOpen? Or is there something special you have to do.
Cheers
Rowan
Subject: WebQueryOpen not accepting URL parameters
Try by creating field Query_String_Decoded on the form.
and create a field “Token” and write formula like
@Trim(@Right(Query_String_Decoded;“&Token=”))
Now you can access thi Token field using DocumentContext in your WebqueryOpen agent.
I hope this may help you.
Subject: RE: WebQueryOpen not accepting URL parameters
That worked.It turned out the problem I was having was if you save the document in the WebQueryOpen agent it saves the cgi variables so the next time the document opens and the WebQueryOpen agent runs the cgi variables never change from what was originally saved.
The work around I’ve used is to get the cgi variables then remove the cgi fields from the document before I save it.
Subject: RE: WebQueryOpen not accepting URL parameters
You should always make the CGI fields computed for display. That way they’re never saved and are “fresh” for every document open, whether for read or for edit.