Hi there,
I need to build a debt payment functionality to my app, where the user enters 3 pieces of information in 3 inputs:
1/A description of the debt/debtID
2/the amount of the debt remaining to be paid (input as a number)
3/the deadline at which the debt will have to be paid (date picker input)
I then have to create a thing in a data type called ‘budget’ with all the monthly instalments (where using simple maths, monthly instalment =total debt/months remaining , so budget has the following structure:
-Month
-Year
-Instalment amount
-Debt ID
The challenge I face is that depending on how long it takes to pay the debt, I will have to create more or less things. For instance, if the debt is $1000, and the deadline is 4 months from now, I will have to create 4 entries (each entry with the instalment amount = $250). Now, if the deadline is 10 months away, I will have to create 10 entries (with instalment amount = $100 each time). Where i am struggling is, how to use worfklows in that scenario. I only know how to create a fixed number of things, and cannot figure out how. to manage the dynamic aspect of the number of things I need to create. Any suggestions would be highly appreciated. Thank you very much !