Search code examples
agentlotus

Passing form data to another form via url in lotus


I am working on a new web app in lotus/domino. I am newer to lotus/domino programming, so forgive me for not knowing something simple.

What I am trying to do is display a table of information, with one of the columns containing a link. The link is formatted like [http://server/app.nsf/form?openform&ideaNum=1&var2=foo2]

How can I retrieve the information from the url, to get information from a view or a document?

So far I have tried to access the query string in the webQueryOpen event, but lotus runs the agent before the DOM writes to the browser, the query_string isn't available.

I am not sure how else to get information from one form to another in lotus.

Thanks for the help.

-Kris


Solution

  • If you're passing multiple params in the query_string, you can get Domino to do a bit more of the work for you. There's an Function command - UrlQueryString - that can format the params into a list, delimiting at the "&".

    E.g. server/app.nsf/form?openform&ideaNum=1&var2=foo2 becomes a list:

    openform ideaNum=1 var2=foo2

    To use it, on the destination form create a multi-value text field called something like "QryStringList". Set it to be computed when composed, and set it's value to @UrlQueryString.

    In your WebQueryOpen agent, you can access the params as doc.QryStringList(0), docQryStringList(1) and so on, if you're using Lotusscript.

    I'm fairly sure I put this together using info from the IBM/ldd forum, but the exact source is lost in the mists of time and memory, so apologies if I've copied someone's post.