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

Posted on 2008-06-19
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

Assisted Solution

daj_uk earned 100 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 400 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now