Please help: web counter in Lotus Notes

phuongnguyen used Ask the Experts™
I am a beginner in Notes designer. I want to create a hit counter in a form and show it in web browser.
Please help me (I am using Notes 5 and I don't have the right to run "agent").
Many thanks,
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
visit and get the simple html file

You are there.

for demo of this counter see

From notes.Net...

I recommend staying away from this Domino-based counter. I get about 100,000 hits/day and was using this clever little tool... it brought my Solaris box to a crawl and it took me a week to figure out that it was this little counter. Drives the HTTP process through the roof.

If anyone has a "fix" to this problem, please advise. In the meantime, I've stopped using it on high-traffic sites.

Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Application Engineer
To do this in a simple way, you would have to be able to run agents.
You could just create an agent that you call from WebQueryOpen event of the form in which you just increase the counter on the document and save it.

The script for the agent would look like this:

Sub Initialize
    Dim session as New NotesSession
    Dim doc as NotesDocument
    Set doc=session.DocumentContext
    Call doc.Save(True, False)
End Sub

Counter is a numeric field, that is Computed when composed with default value 0 (zero).

Also make sure that the agent is signed (=saved) by somebody that has editor access to the database.


Dear Jerrith
I have tried the way you showed, but the counter is alway 1. Please help...
Jean Marie GeeraertsApplication Engineer

Is the agent signed (=saved) by a person who has editor rights on all documents?
Check the agent log for the last run of the agent and see if any errors are displayed. (Just right-click on the agent in the agent list and select Log from the popup-menu)


It's ok now. Thanks!!!!
Jean Marie GeeraertsApplication Engineer

So why did I only get a B for this ?
Because you save the document !


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial