I have an app where users earn points based on actions they take within the app. Each user’s total # of points is stored on a “Points” field within their User database type.
To gamify the app further, at the end of each month I’m going to giveaway a free product. For every point you earn during that month, you get an entry in the giveaway. (So 1300 points = 1300 entries).
I originally was going to create two separate fields for this: one for the lifetime points earned, and another that clears at the end of each month.
Once discovering I could use Bubble’s “grouped by” feature to calculate how many of those points were earned in a given time period via an on-page calculation, I’m wondering if that can be exported since the value is not saved to the DB?
My actual raffle calculations are in a customized Google Spreadsheet so I need to be able to export data that has the username along with the # of points for that given month.
Any thoughts on the best way to achieve this?
So just as an update for anybody who reads this down the road, here is where I’ve landed:
I realized that because I’m currently not tracking XP as it’s own data type, there is no creation date associated with each addition of points, and therefore it’s not possible to view X amount of points within a certain date range.
Rather than restructure my database (I’m already in production and don’t want to deal with the hassle) I’m simply going to have two fields that update when a user gets rewarded:
They will both get updated at the same time with the same values but the difference is the “XP Contest” field will be cleared each month when the contest ends, whereas the “XP” data will never clear and be a lifetime value.
It’s a little more work at the moment to go through the site and find all the areas where XP/points are added, but once it’s done it keeps the two values clean and separate, and because the contest points are actual values (and not a calculated number) it’s easy to export.
To answer the original question of “can I export a calcuated value” I believe the solution would be to create an RG with those values displayed and use the following plugin to download/export those values: