Hello All
I’m having an issue solving a math/action problem, specifically when to create the formula. I need to calculate 2 formula’s to create a budget for Categories chosen by the user.
Formulas:
[1] Calculate the budget for each Service Type (ST) using preset %s.
[2] Calculate the budget for each Category using [1] using preset %s.
My issue is that in order to calculate [1] and therefore [2], I need the sum of all the chosen ST %s which I can find. However, when to create this calculation has me stumped.
- If I calculate [1] when a user picks a Category, the only correct calculation is the last chosen Category because all the ST’s have been chosen.
- If I sum the ST %s every time a Category is picked, the sum seems to never be correct i.e. 0+ current ST %
- If I create the formula when moving to the next screen, Adalo doesn’t seem to know which ST to calculate for.
How do I create a calculation loop for the different ST’s after a user has picked all their Categories in order to create an accurate amount? Here are some screenshots for context. Please help! TIA
STEP1: User picks a Category (Simple List) organised by Service Type (Custom List)
STEP2: Category is created where I initially created the calculation for [1]
ADDITIONAL1: Where I have hardcoded the formula in a label which is correct on another later screen.
Formula [1]:
Current Service Type > serviceBudgetRatio / Current Custom Event > Cust. Event Categories > Service Types > serviceBudgetRatio > Sum
ADDITIONAL2: Database for Category where I have attempted to do the calculations