I have a feature I’m struggling to build and ill be grateful if someone could help with it.
I want to build a monthly scoreboard that will collect points in the local data source based on the month and year. every month there should be a new row created and the points are calculated there.
so far so good.
my only problem is when there are months without points.
what should I do to create a solution that will create rows with zero points based on the distance between the last filled month to the new one?
Can you explain more about what the row values would look like and if the user is entering them and why (what scores are they keeping track of)? Why does a zero value cause an issue?
The user gets points from completing tasks.
Each month the points are summed and in the next month, it should add a new row with the new monthly points.
When the user does not play for one month I want it to add all the missing months automatically when he creates the new month points.
What do you mean by “distance”? Do you mean physical distance on the screen as in x/y coordinates? Or time between months…? Perhaps a sketch of your scoreboard screen layout will help make this clearer.
This approach eliminate calculating differences between dates, december to january comparisons, etc. It will loop a few extra times, but those loops do not do much so they will be extremely fast.
Hey, I tried it, but unfortunately I wasn’t able to create the functionality I desire with the new rows. can you please show in more detail how I do it with the creation of new row when there’s a new month / how can I update the current month score?
They are stored in the local data source.
when the user finishes a task he gets points.
right now the points are calculated in a one table with one row on which all the calculations are.
I want to add a new table with the same columns but just with option to split the row based on the current month.
and off course leave empty rows when the user did nothing in that month.