Forum Academy Marketplace Showcase Pricing Features

Count views within a time period

Hello!

My site has a data table for VIDEOS and one of the fields is a list of date / times the video was viewed.

I want a user to be able to input a start and end date and see how many times a video was viewed during that time period.

It feels like I need:
Current cell’s Video’s dates_viewed:[FILTERED >input start date & <input end date]:count – but :filtered isn’t an option in the dropdowns.

Thanks!

Looks like my post got a bit cut off -

It feels like I need:
Current cell’s Video’s dates_viewed:[FILTERED >input start date & <input end date]:count - but the filter isn’t an option in the dropdowns.

I don’t know why I keep getting cut off…!!

current’s cell’s video’s dates_viewed FILTERED for greater than start date and less then end date COUNT.

However, filter isn’t an option in the dropdown.

Ok, if this gets cut off again… it just wasn’t meant to be…

Haha classic. :smile:

I would try two input fields

  1. for start date
    2)end date

Then a result (count) text box

Result text will equal: do a search for video:count

  • then a constraint on the search that says:
    Cannot be less than input field 1
    And
    Cannot be greater than input 2
1 Like

Using workflows…

Create fields in the database, associated with the videoType you created in the database similar to the following:

VideoName
StartDate
EndDate
ViewCount (default value should be 0)

Set the StartDate and EndDate, then have the following run when a user clicks to view their selected video…

If CurrentCells Video pressed
and CurrentDate > CurrentCells StartDate
and CurrentDate < CurrentCells EndDate
ViewCount = ViewCount + 1

Hopefully that helps :slight_smile:

1 Like

Thanks guys!!

I ended up creating a “DATE” table that would record the video ID and the date viewed each time “WATCH” was hit. Then, I could do similar to @cakeheke’s suggestion of the greater than / less than of the input dates.

@jordanfaucet - this suggestion is very appealing, but I run issues on the constraint, as I need to be able to filter within the list of dates_viewed, and don’t get that option (instead my options were contains, does not contain, is empty, is not empty). I don’t know if I missed something there, b/c your solution would have been an easier implementation.

Thanks for your assistance!!

3 Likes

Great to hear!

I think you could have done a constraint(s) that says:

…doesn’t contain, Do a search for: dates_viewed: formatted as date/time < start date input’s value… Then the opposite for the other.

  • But as they say, if its not broken don’t fix it. Plus I could very well be wrong with the syntax; also multiple “Do a search for layers” are not ideal for debugging…
1 Like