Archive data when updating annual costs

0
If you had an app that tracked training courses and your training classes stay the same but the cost changes from year to year (or bi-annually), how do you set this up so that you can retrieve the correct data? (I preferably only want to update the cost associated with the course name and not have to duplicate the same course name and add a new cost every single time, unless there is an easy way to duplicate the course names and add a new price). 
asked
1 answers
0

Hello Hannah,

 

There are different ways to do this, one is like you said duplicate the course and change the price for the "new" course, you can do this for example with a microflow/nanoflow in combination with the clone action, and some change to add for example the year to the new course.

Another possibility is to separate the price from the course entity and create a price entity with three attributes DateStart/DateEnd and Price, based on the dates it shows the respective price. 

The second gives you probably a better representation of the truth, but the first is I think easier to implement.

 

Hope this helps,

 

Good luck!

answered