Hi All, i have this Expense report application where people track their expenses while on a business trip.
The logic of the trip expense is the following:
- First, you have an SPO list that contains information about your trip, start date, end date, etc.
- Then using a preparing table in PA users start reporting their expenses. The app calculates immediately the total amount of all expenses based on each line in the repeating table

- Once the user submits the form, for each record in the repeating table, an expense record is created in the SPO list.

- The user has the option from the app to do any changes to the expense trip if needed, for example, if the price value is wrong.
- The problem I'm facing is that I'm wondering how to make when the user corrects the price of an expense item this to update the Summary tab which information is stored on the Trip record.

So far i come up with the following idea:
Two variables.
varRecord - which stores information about the selected trip

varExpenseRecord that stored information about selected expense record


I'm guessing that I should have a formula onChange of the inpExpenseValue field, to update the varExpenseRecord value column with the new value.
But I also need to somehow calculate in the varRecord the new total amount for Refundcash and TotalForReimbursement
Something like this:
Current values:
varRecord - Refundcash 244 TotalForReimbursement 244
varExpenseRecord - Value 160
New values:
varExpenseRecord - Value 100
varRecord - Refundcash 144 TotalForReimbursement 144
And from here I will have an Update button that will just patch the new variables data back to the respective SPO list items for trips and expenses which I already know how to do.
Any suggestion on how to solve the problem with the calculations?
Thank you in advance,
Kiril