Jump to content

Download Counter


Recommended Posts

Yes you can make a download but this needs little bit of Javascript:

First you need 2 DataPages:

  • A Report DataPage
  • A single Record Update form

The workflow is similar to this article where the single Record Update Form with a View Counter and a download link.

In your Report DataPage, you should create a link that redirects to your submission form.
image.png.31e02e65a5ec65577f99eea0c7c8a72f.pngimage.thumb.png.58d3755bc6bef79e7ff8d678eef8c3ba.png

In your Single Record Update From, we need to hide the fields just like in the linked article above.
Then set the file counter field to a View Counter

Then add this code example:

<script>
window.location.href = "[@field:Music_File/]";
setTimeout(func, 500);
function func() {
    window.close();
}

</script>

We create a delay to before closing the window so the download cannot trigger multiple times when the tab is closed.

You should now be able to count when the download link is clicked.

Hope this helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...