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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In Part 1 ( we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
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…

705 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

19 Experts available now in Live!

Get 1:1 Help Now