Many data entries when creating new row from form

Hello! I hope you are having a nice day.

I'm having this problem: I use my app to manage a few (3) temporal rental apartments. I'ts been working really good but i want to improve the cost management and visualization.

I've added a "few" tables to register the costs of each reservation: 

  1. Labor Costs
  2. Utilities Costs
  3. Travel Agency Commission Costs
  4. Taxes Costs
  5. Maintenance Costs
  6. Administrative Costs
  7. Amenities and goods Costs
  8. Payment Method Costs
  9. Extra Costs
  10. Linen Costs

Also setted up an action (that executes like other 12 actions) when save a new reservation to set the id of each cost table from before to uniqueid() and also the id that relates the cost table entry to the reservation id.

Some of this costs tables also have sub-tables that have the information needed to calculate each cost, such as percentage of taxes, percentage of travel comission, etc.

Right now when i create a new reservation this two values are added to each cost table:

1. An unique id for each table value: uniqueid()

2. The id from the reservation linked to the new row of the cost table: [id_reserva]

So basically when I add a new reservation i have like 14 things being added to the datasource. I don't think this is the most effective way to accomplish this but i dont know how else to do it.

 

The idea after this is that I create another action for each table that executes and calculates the value of the cost when i add a new payment to any reservation.  Something like this:

For reservation A:

1. New payment added: Execute a form saved action that has the actions to calculate the costs for each table based on the sub-tables information.

 

 

What if i want to escalate my app to manage 20 or more apartments? i believe my app will explode lol.

 

Do you have any recommendations on how to improve or achieve this in a more effective way? i'been trying to accomplish this for a long time but i canยดt come up with solution :(.

 

Hope you can help me.

Regards,

Federico.

Solved Solved
0 4 128
1 ACCEPTED SOLUTION

Ok yah, some of those definitely make sense to have as separate tables. I'd probably lean towards trying to combine all of your cost tables into one table. Seems like it'd be simpler and easier to manage that way. Make sure to include a CostType column to distinguish them.

As far as making sure your app doesn't get overloaded with creating records, I'd maybe suggest looking into using the API to generate all of the cost records.

View solution in original post

4 REPLIES 4
Top Labels in this Space