Domino Web Application - Updating a Field on a document in read mode

Posted on 2008-06-19
Medium Priority
Last Modified: 2013-12-18
Hi all

I have a domino web application in which I want to capture user logging details(username) and update that on a field on the form called "currentuser", however this has to happen when the document is in read mode as all users are allowed to open the document only in Read Mode

I know that you're not able to update a field on a document in Read Mode, but I was under the impression that something like this can be done in an Ajax agent but I am not sure how to do it.

Any ideas or solutions to this issue will be much appreciated


Question by:varvoura
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Assisted Solution

daj_uk earned 400 total points
ID: 21821528
You could write an Agent that runs on the server and updates the document prior to it being sent to the user.  I assume the server (or signer of the Agent) would have Edit access?
LVL 22

Accepted Solution

Bill-Hanson earned 1600 total points
ID: 21832297
You can use Ajax, a WebQueryOpen agent, or a <Computed Text> element.

Depending on what you are using this for, the simplest method is to use a <Computed Text> element that will display the current user's name.  Since this is not a field, there are no restrictions for updating the display.

If a computed text element is not robust enough for your needs (it would help to know why you need this), then I would try using a WebQueryOpen agent next.  Just use LotusScript to set the item value.  The important thing to remember is that you can update the value of an item regardless of whether the document is in read- or edit-mode.  You will get an error, however, if you try to save a document that is in read-mode.  I use this technique in Notes client forms all the time; using the form's QueryOpen event to set backend read-only data.  The same concept will work using WebQueryOpen.

AJAX would require the most setup, and is only required when you need to update a part of a page (to prevent reloading the entire page).  It sounds like all of the data you need is available when the page loads, so the code really should go in WebQueryOpen (unless the computed text element works).

Author Comment

ID: 21836654
Hi Bill,

Great answer, I did the exact same thing yesterday before I saw your post.
I created a WebQueryOpen agent to populate a the username in a computed for display field. This then helped me to create profile docs for all those users that opened the documents(still in the webqueryopen agent).
Then I created a second scheduled agent where I am the signer of it and i have full rights to all the documents to update and save the user data on all the documents using the data in the profile documents

Many thanks to you both

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question