Track the no.of button-click downloads

Track the no.of button-click downloads

Hey Creators!

We're here with yet another episode of Creator Simplified for you!

In this post, we'll see a workaround to count the number of button-click downloads made in the report.


Usecase

In a training app, students can download the course material that suits them, and trainers need to track the course demand by counting the number of downloads made.

Demo
  1. Create a form (here, Course_Material) with a file upload field (Study Material) to upload the materials.

  2. Add a number field (No.of downloads). From its field properties, keep the initial value as 0 and set the visibility as Admin only. 

  1. Create a custom button to download the file with a single click. Refer to this document to get the code.

  2. Add another action and type

  1. input.No_of_downloads = No_of_downloads + 1;
      5. Add the number field and the custom button to the report's quick view.


Output

Refresh to see the update. 



It can't get any simpler than this.

That's about it!

Feel free to share your thoughts in the comment section below.

Thanks!