Solved

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

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

varvoura

0
Comment
Question by:varvoura
3 Comments
 
LVL 5

Assisted Solution

by:daj_uk
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?
0
 
LVL 22

Accepted Solution

by:
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).
0
 

Author Comment

by:varvoura
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
varvoura
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
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…
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…

773 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