Need Help with a Data Table

hello people!

so right now i’m working on getting a sort of data table for my users, but am having a hard time figuring it out. my users post VideoPosts and then sell them for a given Price. i would like to make a chart - for each individual user - that shows each time someone makes a transaction for a video so they can see how much each video is making.

for example, i want the chart to say
#ofPURCHASES (xxxxx)
EARNINGS (xxxx) (number of purchases*video price)

i’d want it to be in a repeating group, w each group representing a different videopost.

i’d like to take this chart further too, but i think if i can get just what i’ve desribed above, then i can probably figure out the rest

whats the logic i can give this? do i make a new datatype called transactions? i tried this with the fields (customer(user), customer email, time of transaction, and video_referred to (which includes another datatype VideoPost which includes all the basic things like the title, person who uploaded it etc))) but when i did it it separates the table into each individual purchase, like

Video Title: “whatever”
Purchase: 1
Earnings: $1.34

Video Title: “whatever”
Purchase: 1
Earnings: $1.34

Video Title: “whatever”
Purchase: 1
Earnings: $1.34

again and again and again

instead i want it to show the video its referring to in one group of the repeated groups, with the TOTAL earnings for that one video in itself.
also it doesn’t actually show the video title either, but i know its registering cause i can see the money being shown in the chart/table, so yeah

i’m stumped for some reason, hope someone can help!

Hey @artreggie

You can simply set both Number of purchases and Earnings fields as type number.
Whenever someone purchases a video, run an action Make Changes to Video and edit the fields:

  • Number of purchases = This Video’s Number of Purchases + 1
  • Earnings = This Video’s Earnings + This Video’s Price

You can (and probably should) have a data type Transaction and create a new Transaction for each purchase, but that’s unrelated to what you’re trying to achieve here.

Hope that helps!

Need extra help?

Book a free 15 minutes call - happy to help if I can

Yeah, i plan on having both types of tables here, but thatnks for that, i didn’t think of the +1 function lol.

thanks ambrois for your continued support

This topic was automatically closed after 70 days. New replies are no longer allowed.