Please help: web counter in Lotus Notes

phuongnguyen
phuongnguyen used Ask the Experts™
on
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,
Phuong
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
visit http://www.fastcounter.com and get the simple html file

You are there.

for demo of this counter see http://www.SetonCollab.com

-Arun.
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.

Damian
damian@svothi.com
http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/0ef3caf46d43793185256a92007d1d34?OpenDocument
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
Commented:
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
    doc.Counter=doc.Counter(0)+1
    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.

Author

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

Commented:
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)

Author

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

Commented:
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