?
Solved

Display a web hit counter on a view

Posted on 2003-02-20
3
Medium Priority
?
216 Views
Last Modified: 2013-12-18
I used the following code to generate a hit counter:

FIELD CountDate := CountDate;
FIELD Counter := Counter;
count := @GetProfileField("WebCounter";"Counter";"Anonymous");
date := @Now;
@If(count="";@Do(@SetField("count";1);@SetProfileField("WebCounter";"CountDate";date;"Anonymous"));@SetField("count";count+1));
@SetProfileField("WebCounter";"Counter";count;"Anonymous");
@SetField("Counter";count);
@SetField("CountDate";@GetProfileField("WebCounter";"CountDate";"Anonymous"));

How can I display the counter on a view??
0
Comment
Question by:ccgarciam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Accepted Solution

by:
scottrma earned 200 total points
ID: 7990996
Not sure if @GetProfileField works in views, but since it appears that you are also storing the counter value in the document (as well as the profile document), you could use the value from the document to display in the view. In your formula above, I believe this would simply be the field "count" or "Counter".

You could also have your view display as part of a $$ViewTemplateForViewname or $$ViewTemplateDefault form, which would allow you to place the value of the counter anywhere you want on the form.

Hope this helps.

Scott
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question