[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

Display a web hit counter on a view

I used the following code to generate a hit counter:

FIELD CountDate := CountDate;
FIELD Counter := Counter;
count := @GetProfileField("WebCounter";"Counter";"Anonymous");
date := @Now;

How can I display the counter on a view??
1 Solution
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.


Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now