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