hi Mishav,
Sorry, the background of the problem I’m trying to solve and the meaning of the data was in a larger question that I then broke down into parts but did not include in the parts.
In simple words, the larger context is one in which I want to manage the assignment of assets (e.g. a computer or a piece of software) to people based on requests for adding or removing business roles. The items in the tables above represent those assets. The mapping between requested roles and required assets is kept in a table in bubble, which I already have.
The list in the first table is the result of creating those records based on the requested roles and the map of roles to items.
Opening values represent assets that the person already had when a role was requested to be added or removed.
There can be hundreds of different items (A B C …)
There are only three types of “instructions”
- Opening
- Plus One
- Minus One
Ideally, the result, which is the SUMMARY LIST s/b in a repeating group. There is no need to persist it further once the request has been processed. But the SUMMARY LIST is still not the end of the game. I’ll need those values to create a table with values that need to be persisted.
Since I have to process the numbers further, I’d rather have the result in numeric format.
I’d rather have all this happening in the server.
It is possible to build the rows in SUMMARY LIST as the data is created / edited. If that were the case, the first rows that would impact the result are those in ITEM LIST with “Opening”. The values for those items in Plus One, Minus One and Net would be zero and the value of Closing would be equal to Opening.
If I add a role in the request, all the items (A, B, C, etc) required by that role would get an increment in the column Plus One, and the Net and the Closing be recalculated.
If I remove a role, all the items required by that role would get a decrement in the column Minus One and again the Net and Closing would be recalculated.
Of course, if I remove the request to add a role or the request to remove a role, the impact on the respective rows of the items required by that role would need to be updated.
I hope this answers your question.
Thank you in advance for your support!
Alex