Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
An easy way to build your own simple, text-based Domino hit counter (continued)

FIGURE B

Be sure to select the right options.

Step 2: Create a new, shared agent
Next, create a new, shared agent (shown in Figure C) and name it, for example MakeOrEditProfileCounter.

FIGURE C


Be sure to create your agent using this as an example. Roll over picture for a larger image.

Enter the following LotusScript in the Initialize event:

Sub Initialize
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Call workspace.EditProfile("TheCounterForm")
End Sub

Now save the agent.

Step 3: Create an agent for incrementing the counter
Create a new shared agent for incrementing the counter. Name the agent IncrementCounter, for example. See the settings on Figure D.

FIGURE D


Try to make your agent match these settings. Roll over picture for a larger image.

For the agent, enter the following formula:

FIELD ii := ii;
nn := @GetProfileField("TheCounterForm"; "TheCounter");
tt := @Text(@TextToNumber(nn) +1);
@SetProfileField("TheCounterForm"; "TheCounter"; tt);
@SetField("ii" ; tt)

There's one more thing you have to do before saving this agent. Select the Options button (top right), and check the Available to Public Access users checkbox. Now you can save the agent.

Step 4: Add the counter field to the Navigator template
Next, you have to add the counter field to the Navigator template form.

Open the form $$NavigatorTemplate for MainNavigator in design mode. Make a table, (three columns, one row), where you want to place the counter. Add a Computed text field in the middle cell, name it "ii", and for the formula enter "ii" also, as shown in Figure E.

FIGURE E


Place your counter on the form. Roll over picture for a larger image.

Please notice the ruler for the first column. The red x indicates where I created a small dot, displayed in the color of the page's background. I needed to do this to cheat the browser, to keep the middle cell in the middle. Anyway, this is the way I display the counter in a narrow fixed length column with a background color. Save the form.

Step 5: Enable the counter
Next, you'll need to enable the counter. Open the form: $$NavigatorTemplate for MainNavigator in design mode.

Select the WebQueryOpen event, and add @Command([ToolsRunMacro]; "IncrementCounter") in the formula window, as shown in Figure F. Then save the form.

FIGURE F


Be sure to copy the formula correctly. Roll over picture for a larger image.


« Previous  ·  1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > Lotus Technologies > Domino (77 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   Sloppy analysis at the core of another Domino vs. SharePoint report
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Tips & Techniques (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login