I have a table component pulling in data from a postgres database. One of the columns i'm pulling in called "Cost" is a dollar amount. I have two more columns in the table component that allow me to add a percentage markup to the Cost. The other two columns are "Markup" which is a percentage type that can be edited and the other column is "Total" which is the final computed amount from the Cost column multiplied by the Markup column. The total column has a mapped value of:
I guess there's a few things not working as needed. First off, I changed the table name from table37 to reconcileExpenses.
My mapped value for the Total column isn't calculating in real time when i update the Markup column. When I run the updateExpenses query it all works, but the Total column doesn't get added to the database table because it's a mapped value?
Here's the mapped value for the Total column:
Sorry @dru_nasty, but I don't know a local way to solve this problem. Inserting a transformer or changing the data in the update query may be a solution. But I think these are not what you are looking for.
Thanks for that, i'm still really stuck on the fact this mapped value doesn't update my total column in real time. Only after running a save as query on the table and updating the database.
So it's still two issues: 1) Can't see mapped value updates in real time on the table after changing data. 2) The total column data isn't saved to the database.
I get an error of "Primary key expense_id is not present in supplied array."
Doesn't matter if ia set the primary key to expense_id on my table component either, i get the same error. Only when I do that then my total column doesn't not update the value in real time.
Maybe this explains it better, i changed the 2nd row markup to 10%. Nothing changes.
When i hover over currentsourceRow.cost in the mapped value, it shows 10 (which is the cost value for the first row in the table). Something not lining up for some reason. Apologies for not following or being able to explain.