Increment count each time audio file is played

Hello. In my app, I have 5 categories of music.
Each category has multiple songs.

My goal is to count how many times each song is played, per user.
How do I apply an action to an audio component so that I can increment the database?

The audio portion for a representative song currently appears like this

I’m unable to find a place to add an action. Is this possible in the action editor? If yes, what would be the action recognized by Glide as initiation of an audio file? They don’t need to listen to the complete song to increment the count.

For every play it is currently not possible

ok, thanks

Once this audio component has no way of adding action, it limits the possibility of adding an increment for each play

Let’s try a different approach.

Similar scenario in which

  1. User clicks on a song within a list
  2. Currently, the action is to show detail screen for this item.
    It looks like this

Those songs are on data sheet called ‘Songs.’

The bit I would like to change is to have the following occur

  1. User clicks on a song within the list
  2. The detail screen for that song is displayed and a column in the ‘Users’ data sheet called ‘SongCount’ increments by 1.

How do I increment on the ‘Users’ sheet while the action is performed using data from the ‘Songs’ datasheet?

That could work. But think about it, what if the user plays it 2 or more times without having returned to the screen?

For this purpose, that’s ok.

How do I increment on ‘Users’ for an action performed on ‘Songs’? The actions will only give me options to choose from the ‘Songs’ columns.
Would it be something like

  1. write to an increment column on ‘Songs’ using the row associated with the particula r song
  2. create a LookUp in ‘Users’ to capture the increment
  3. clear the increment on ‘Songs’ so the next user can increment as well

This seems like I’m headed in the wrong direction…but not sure at which turn I am wrong.

How would you do this?

I found inspiration in Robert Petito’s tutorial on gamification.

Using a relation column from the Songs sheet to the Users sheet enables me to accomplish my task.
Thank you

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.