Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
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. Click 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. Click 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. Click 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. Click picture for a larger image.




[ Prev | Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

PistolSTAR: the de facto standard for Lotus authentication
PistolStar's Password Power integrates with Microsoft Active Directory to enable single sign-on to Lotus applications and automatic recovery of the Notes ID password via self-service reset of the Active Directory password.

  • A single set of credentials to remember - one set of password policies to manage.
  • Cost-effective plug-ins integrate smoothly with your environment.
  • Proven, ground-breaking technology deployed to millions of users.


Learn more.
-- Advertisement --

INSTALL, UPGRADE NOTES CLIENTS WITHOUT VISITING EACH DESKTOP
Use InstallPump to automate your Notes R8 migration. InstallPump enables you to rollout Notes throughout the enterprise without visiting each desktop.

  • 100% fully automated Notes upgrades/installs.
  • Modify the Replicator Page, Address Book, and Desktop... and much more.

See for yourself. Full evaluation copy available at installpump.com.

Download your FREE evaluation copy of InstallPump today.

Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login